Chess#2358

Chess

2 seconds
64 megabytes
Very easy

Yesterday, the wise Owl in her beautiful castle "Chestnuts" discovered a chess set. However, only Rabbit was able to fully listen to and remember the rules of the game. So, Owl decided to simplify the rules. As a result, only pieces remain on the board, named after the inhabitants of the Enchanted Forest for easy memorization. One piece is, naturally, the formidable Elephantopotamus, after whom the traditional chess bishop is also named. The second piece was unanimously named after Tigger (who else could catch the Dread...pota... Elephantopotamus?). Tigger is not satisfied with the movement of existing pieces and wants to move (or rather, jump) in his own unique way, since Tigger loves to jump, jump, and jump. Specifically, he wants his piece to be able to jump either two squares vertically or horizontally, or one square diagonally. Owl also decided that it would be fair if the Elephantopotamus piece did not move, as a real Elephantopotamus usually hides in ambush and stays still so as not to be noticed.

Help the inhabitants of the Enchanted Forest determine whether Tigger can catch, that is, land on the same square as, the Elephantopotamus during a chess game.

Input

The input file contains the coordinates of two squares, indicating the positions of Tigger and the Elephantopotamus, each on a separate line. The coordinates of the squares are given as a pair consisting of a letter (from to ) and a number (from to ), without spaces.

Output

In the output file, print YES if Tigger's piece can catch the Elephantopotamus, and NO otherwise.

Examples

Example 1

Loading
Loading