My tree!
People from the ENS Rennes pay particular attention to the environment. For that reason, you have been requested to plant a tree in a field next to the school. But the only tree you have is a giant oak from your garden, close to the university.
You decide it's time for it to see the countryside. You un-plant your giant oak, and hop into the bus with it. But as you arrive at the ENS, you drop it, and it makes a huge crack!
You need to check if your tree is still a tree.
Input
On the first line, two integers, \(V \leq 800\) and \(E \leq 1000\), which are respectively the number of vertices and edges of your totally organic tree. Note that vertices are number from 1 to \(V\).
On the next \(E\) lines, two integers, \(a\) and \(b\), which indicate a branch from vertices \(a\) and \(b\). A branch does not have an orientation.
Output
You program will have to output "It's fine!" if the tree is still a tree, or "OH NO IT'S BROKEN" if the tree is not a tree anymore.
Sample Input
5 4
1 2
2 3
2 4
3 5
Sample Output
It's fine!
Comments