You can not tell from the engine serial number. There should be a metal vin tag riveted near the left side of the timing chain cover. If the engine is in the car you have to look from underneath. Many junkyard motors and all JDM motors don't have it. The tag looks something like this but this pic came from a gen2. .