Taly likes to take photographs. Because he is interested in geometry and graphics. One day, he went to a museum which exhibits all kinds of things of Mars people. He is surprised that the Mars people use the arabic numberals as human beings. But they only use the number from 0 to 8 and they like to write the numbers in a skew style as the gure sees. Then Taly took many photographs of the number writing (in fact,it is forbidden to take photograph in the so mystical museum). When home, he transformed these photograph into the graph on a 2 - D plane. Taly is confused that how to identify the numbers automatically. Now Taly ask help to you to write a program to identify the numbers.