403729: GYM101246 D Fire in the Country

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. Fire in the Countrytime limit per test1 secondmemory limit per test256 megabytesinputinput.txtoutputoutput.txt

This summer's heat wave and drought unleashed devastating wildfires all across the Earth. Of course, a tiny country on the island "Yars and Eva" is also affected by this ecological disaster. Thanks to the well-organized actions of rescuers, all the citizens were evacuated to the nearby planets on a spaceship.

To save the country, a small fire robot was left on its territory. He managed to extinguish fire in all cities except the capital before running out of liquid. The robot can't extinguish fire anymore, so the country is still in danger at the moment.

There are n cities in the country connected by m two-way roads. Each road connects a pair of cities. There is at most one road between any pair of cities. The cities are numbered from 1 to n, with capital having the number 1.

The fire spreads very quickly. On the very first day only the capital is on fire. But with every subsequent day, the fire devours all the cities connected by a road with the cities that are already on fire. Once the fire gets to a certain city, this city will continue to stay on fire till the very end.

The robot can't extinguish the fire anymore and there are no other means of firefighting left in the country, so obviously the country is going to be burned down to the ground. And you don't have to be a hero and save it. The key thing is that the robot is going to be destroyed by fire as well, and you need to figure out who will actually pay for the loss of government property.

Two pilots, Nikolay and Vladimir, are on Earth's natural satellite. They alternately take turns controlling the robot. The pilots alternate each day. Robot's speed is equal to the speed of fire, so the robot can get to the neighboring city in a day. Each pilot does not want the robot to be destroyed on his turn. For such a valuable loss they will have to pay a huge fee to the government.

On the first day the robot is located in the capital. Nikolay controls the robot on the first day. Thus, Nikolay controls the robot on the days with odd numbers, and Vladimir controls it on the days with even numbers. Taking turn, a pilot has to move the robot from the current city to any city connected by a road with the current one. If a pilot moves the robot to a city which is on fire, the robot is destroyed.

You task is to figure out who will pay the fine for the destroyed robot, assuming both pilots act optimally.

Input

The first line of input contains the amount of cities n and the amount of roads m in the country (2 ≤ n ≤ 1000, n - 1 ≤ m ≤ 1000). The following m lines contain description of the roads: a, b — indices of the cities connected by roads (1 ≤ a ≤ n, 1 ≤ b ≤ n, a ≠ b). The roads are bidirectional. No pair of cities will be connected by more than one road. There will be a path between any two cities.

Output

Output the name of the pilot who will pay the fine, assuming both pilots act optimally ("Nikolay" — if it is Nikolay, "Vladimir" — if it is Vladimir).

ExamplesInput
4 3
1 2
1 3
2 4
Output
Vladimir
Input
4 4
1 2
1 3
2 4
3 4
Output
Nikolay
Input
4 5
1 2
1 3
2 4
3 4
2 3
Output
Nikolay
Note

In the first sample test, an optimal strategy for Nicolay is to send the robot to the city 3 on the first day. Vladimir then will be forced to send the robot back to the capital, so the robot will be destroyed and Vladimir will have to pay.

加入题单

上一题 下一题 算法标签: