The second regular exam is approaching, and the students of Gyeonggi Science High School, numbered from to , are studying hard. The students have close friendships, and students who are friends help one another. There are friendship pairs in total.
One day, Seojun gives Mingi the ✧ ✦ Spark of Exam Luck ✦ ✧! Kindhearted Mingi wants to pass the spark on to many other students to help them do well on their exams. No student should feel left out while everyone around them receives a spark, so Mingi chooses two integers and wants every student numbered from to to receive one. Here, .
The input is given in the following format.
Print the answer to the problem on the first line.
The other students are just as kind as Mingi, so the sparks are passed as follows.
If a student receives several sparks at the same time, they pass each spark independently hour later. That is, for each spark, only the friend who passed that particular spark is excluded. Thus, several sparks may be passed to the same student at the same time, and a student may pass a spark back to a friend who gave them another spark in the preceding round.
All students must receive a spark at least once through this process. Since the exam is approaching, the propagation must also end completely within hours. In other words, nobody may receive a spark at time or later.
Find the number of ordered pairs for which this is possible.
For each (), are the numbers of two students who are friends. No friendship pair appears more than once, and no student is their own friend.