So you bought a bad engine to replace a bad engine? Yes, you most definitely need to change valves if they touched pistons. Even if they look fine, you could have a "low or no" compression problem. Do you have a machinist near your location? A specialist in engine specifications with tools for checking the parts? If you don't know what caused the engine you bought to fail, you may be installing the same problem into your vehicle. It needs to be carefully inspected by a specialist.