Win7 ( Non-Legit ) to Windows 8

Hey there - just wondering if you can buy a copy of Windows 8 from a store or online and install it over a Non-Legit copy of Windows 7? Is this possible? Has anyone done this? Any comments that could help a brother out?

Full install, including formatting, yes.

Sweet - Online is kinda being no direct about it.