Both the yz and KTM exc are great bikes but very different, Both very reliable,the YZ will have
more punch with the 520 being a little slow,but more trackable power.
If you can get a 525 they are quite a bit more worthy. I can remember riding my old 02 520 after having the 06 525 for about a year. after a quick ride I was asking myself how the heck did I ride that bike for so long, it felt heavy and quite porky
The YZ can make a good trail bike with some mods. The KTM is a great trail bike right out of the box