#Lutece1034. AC Milan VS Juventus
AC Milan VS Juventus
Migrated from Lutece 1034 AC Milan VS Juventus
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Kennethsnow
and Hlwt
both love football.
One day, Kennethsnow
wants to review the match in between AC Milan and Juventus for the Championship Cup. But before the penalty shootout. he fell asleep.
The next day, he asked Hlwt
for the result. Hlwt
said that it scored : in the penalty shootout.
Kennethsnow
had some doubt about what Hlwt
said because Hlwt
is a fan of Juventus but Kennethsnow
loves AC Milan.
So he wanted to know whether the result can be a legal result of a penalty shootout. If it can be, output Yes
, otherwise output No
.
The rule of penalty shootout is as follows:
-
There will be turns, in each turn, teams each should take a penalty shoot. If goal, the team get point. After each shoot, if the winner can be confirmed(i.e: no matter what happened after this shoot, the winner will not change), the match end immediately.
-
If after turns the teams score the same point. A new turn will be added, until that one team get a point and the other not in a turn.
Before the penalty shootout begins, the chief referee will decide which team will take the shoot first, and afterwards, two teams will take shoot one after the other. Since Kennethsnow
fell asleep last night, he had no idea whether AC Milan or Juventus took the first shoot.
Input
The only line contains integers , . Means the result that Hlwt
said.
Output
Output a string Yes
or No
, means whether the result is legal.
Samples
3 2
Yes
2 5
No
Note
The Sample is the actual result of the match in .
The Sample , when it is : after turns, AC Milan can score at most point in the next turn. So Juventus has win when it is :. So the result cannot be :.
This story happened in a parallel universe. In this world where we live, kennethsnow
is a fan of Real Madrid.
Resources
The 13th UESTC Programming Contest Preliminary