Malaysia has a federal constitutional monarchy with a two-house legislature. The head of state is the Yang di-Pertuan Agong who is selected from nine hereditary sultans and serves a five-year term. Executive power lies with the prime minister, who is the leader of the majority party. The bicameral parliament consists of the House of Representatives and Senate. The judiciary is headed by the Federal Court, with lower courts including Sessions Courts and Magistrates' Courts. Malaysia is divided into states and federal territories at the local level, each with their own constitution and legislative assembly.