First, back up all your important data and settings.
If you have a valid win 8 key, I would create a bootable medium with win 10 using the media creating tool.
Then install win 10 by upgrading win 8.1.
Then you can boot from your medium and do a clean install.