Explain the principle of operation of a four-stroke internal combustion engine, detailing the sequence and function of each stroke. Discuss how the intake, compression, power, and exhaust strokes contribute to the engine's performance and efficiency. Additionally, describe the role of the crankshaft and camshaft in synchronizing these strokes within the engine's cycle.