Friends with the Monster
You have just finished a 12 hour study session at uni and are ready to go home when you realise that the Duck Lounge has run out of Monsters, sending all the other computer science students into a zombie-like state. To make things worse, you just posted on Discord a picture of yourself with a 4-pack of Monster, so now they're after you! Can you make it to your bus stop before any of the computer science students catch you?
You are on an infinite 2-dimensional grid, and you start at coordinates . There are
crazed computer science students chasing you, each with some starting coordinates
. Your bus stop is located at coordinates
. Every turn, you and all the other students can move one unit in each of the cardinal directions or remain still, and if you end up on the same square as any of them (even the bus stop), they will steal your Monsters and you'll be in trouble. Can you make it to the bus stop with your treasured energy drinks intact?
Input
The first line contains two integers . This is the coordinates of the bus stop exit.
The next line contains a single integer detailing the amount of crazed students. The next
lines each contain two integers
, the coordinates of the
th student.
Output
If you can make it to the bus stop without any of the students catching you, print "Yes! We did it!" on one line.
If any of the crazed compsci students can catch you, including moving to the bus stop square on the same turn you arrive, print "Oh no! The zombies ate your brains!"
Example
Input 1
2 2
1
5 5
Output 1
Yes! We did it!
The bus stop takes you 4 moves to get to, and you can reach it before the student at can intercept.
Input 2
1 0
1
2 0
Output 2
Oh no! The zombies ate your brains!
You and the student are both a single turn away from the bus stop. Since you both arrive there on the same turn, you lose.
Comments