###Answer the question from the input provided. Please answer from input only.

###Input: Emperor Gegeen Khan, Ayurbarwada's son and successor, ruled for only two years, from 1321 to 1323. He continued his father's policies to reform the government based on the Confucian principles, with the help of his newly appointed grand chancellor Baiju. During his reign, the Da Yuan Tong Zhi (Chinese: 大元通制, "the comprehensive institutions of the Great Yuan"), a huge collection of codes and regulations of the Yuan dynasty begun by his father, was formally promulgated. Gegeen was assassinated in a coup involving five princes from a rival faction, perhaps steppe elite opposed to Confucian reforms. They placed Yesün Temür (or Taidingdi) on the throne, and, after an unsuccessful attempt to calm the princes, he also succumbed to regicide.

When Yesün Temür died in Shangdu in 1328, Tugh Temür was recalled to Khanbaliq by the Qipchaq commander El Temür. He was installed as the emperor (Emperor Wenzong) in Khanbaliq, while Yesün Temür's son Ragibagh succeeded to the throne in Shangdu with the support of Yesün Temür's favorite retainer Dawlat Shah. Gaining support from princes and officers in Northern China and some other parts of the dynasty, Khanbaliq-based Tugh Temür eventually won the civil war against Ragibagh known as the War of the Two Capitals. Afterwards, Tugh Temür abdicated in favour of his brother Kusala, who was backed by Chagatai Khan Eljigidey, and announced Khanbaliq's intent to welcome him. However, Kusala suddenly died only four days after a banquet with Tugh Temür. He was supposedly killed with poison by El Temür, and Tugh Temür then remounted the throne. Tugh Temür also managed to send delegates to the western Mongol khanates such as Golden Horde and Ilkhanate to be accepted as the suzerain of Mongol world. However, he was mainly a puppet of the powerful official El Temür during his latter three-year reign. El Temür purged pro-Kusala officials and brought power to warlords, whose despotic rule clearly marked the decline of the dynasty.

Due to the fact that the bureaucracy was dominated by El Temür, Tugh Temür is known for his cultural contribution instead. He adopted many measures honoring Confucianism and promoting Chinese cultural values. His most concrete effort to patronize Chinese learning was founding the Academy of the Pavilion of the Star of Literature (Chinese: 奎章閣學士院), first established in the spring of 1329 and designed to undertake "a number of tasks relating to the transmission of Confucian high culture to the Mongolian imperial establishment". The academy was responsible for compiling and publishing a number of books, but its most important achievement was its compilation of a vast institutional compendium named Jingshi Dadian (Chinese: 經世大典). Tugh Temür supported Zhu Xi's Neo-Confucianism and also devoted himself in Buddhism.

After the death of Tugh Temür in 1332 and subsequent death of Rinchinbal (Emperor Ningzong) the same year, the 13-year-old Toghun Temür (Emperor Huizong), the last of the nine successors of Kublai Khan, was summoned back from Guangxi and succeeded to the throne. After El Temür's death, Bayan became as powerful an official as El Temür had been in the beginning of his long reign. As Toghun Temür grew, he came to disapprove of Bayan's autocratic rule. In 1340 he allied himself with Bayan's nephew Toqto'a, who was in discord with Bayan, and banished Bayan by coup. With the dismissal of Bayan, Toghtogha seized the power of the court. His first administration clearly exhibited fresh new spirit. He also gave a few early signs of a new and positive direction in central government. One of his successful projects was to finish the long-stalled official histories of the Liao, Jin, and Song dynasties, which were eventually completed in 1345. Yet, Toghtogha resigned his office with the approval of Toghun Temür, marking the end of his first administration, and he was not called back until 1349.

The final years of the Yuan dynasty were marked by struggle, famine, and bitterness among the populace. In time, Kublai Khan's successors lost all influence on other Mongol lands across Asia, while the Mongols beyond the Middle Kingdom saw them as too Chinese. Gradually, they lost influence in China as well. The reigns of the later Yuan emperors were short and marked by intrigues and rivalries. Uninterested in administration, they were separated from both the army and the populace, and China was torn by dissension and unrest. Outlaws ravaged the country without interference from the weakening Yuan armies.



###Question: What problems did the Yuan dynasty have near its end?

###Answer: {'answer':'struggle, famine, and bitterness'}