During Confucius's stay in the State of Qi, one day Duke Jing of Qi was holding morning court. A single-legged bird suddenly flew down before the palace hall, hopping about. Duke Jing found this strange and asked his ministers, "I have never seen a bird with only one leg. Does any of you recognize this bird?" As he spoke, his eyes fixed on Yan Ying (the wise and learned prime minister of Qi), hoping that Yan Ying's intelligence and erudition could resolve his confusion. Yan Ying, not knowing the answer either, had to reply, "I truly do not know." Gao Zhaozi (a high-ranking minister of Qi) said, "People call Confucius a Junzi (Exemplary Person) of broad learning. Why not consult him?" Duke Jing of Qi then sent for Confucius. After examining the bird, Confucius said, "This bird is called Shangyang, and it is an omen of flood." Duke Jing asked, "How does you know this?" Confucius replied, "In the past, there were children who bent one leg, spread both arms, and sang while hopping: 'Heaven is about to send heavy rain, and the Shangyang dances.' Now that a single-legged bird appears before the hall, there will surely be a flood. You should quickly notify the people to dig ditches and repair dikes to prevent disaster." So Yan Ying and Gao Zhaozi immediately made arrangements with the relevant ministers and issued orders nationwide. A few days later, heavy rain indeed fell, causing floods that affected all neighboring states. Only the State of Qi, having prepared in advance, had its crops in the fields completely unharmed. The entire court burst into exclamations of admiration, and the people of Qi were all grateful to Confucius. After the flood, Duke Jing of Qi regarded Confucius with newfound respect and even called him a "sage."
