The frame of the motorcycle and the engine both have the same VIN number. If they do not match then one is from another bike.
If you have a clear title they will both be on the title. If its salvaged title they don't come with a engine number on the title
Burn it and run, best it really
From what I under stand only police can tell, I have no idea how they do that since I was told that engine numbers are NOT unique meaning you can find at least 29 other engines manurfactured at the same time as yours that have the same number. I know you can track the year of the bike it came out and the make and model but have no idea how they find anything else. Contacted yamaha dealer and they say you can track it but only a dmv inspector. So if you find this out let me know lol