Queen's Journey 3
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given a sequence of squares on an 8×8 chessboard, represented by consecutive queen coordinates in chess notation, determine if this sequence forms a queen's tour that covers all the squares on the board.
A square is considered visited if it is either explicitly listed or lies on one of the straight-line paths of a queen's move.
Input
The input consists of a single line containing the sequence of the queen's moves in chess notation (see examples). The length of this line is always even and does not exceed 254 characters. All moves are guaranteed to be valid according to chess rules.
Output
Output "Yes" if the sequence represents a queen's tour covering all squares on the board, and "No" otherwise. The output should be without quotes.
Examples
Input #1
Answer #1
Submissions 325
Acceptance rate 29%