Perpetual Motion Machine and the Laws of Thermodynamics