3051 - [wc2013]平面图

Input

Output

Examples

Input

Sample Input

Output

2
3
-1
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题