Brick Game

Author: Abu Rayhan Ahmad

Problem Setter: Mohammad Azijul Hakim Siam, 29th Intake, Dept. of CSE

Bangladesh University of Business and Technology (BUBT)

Rayhan & Imran are best friends and love to play games. Today they decided to play brick games. The game is very simple. They need to move all the bricks from spot A to spot C under few conditions-

·         Always pick a brick from top and move it to the nearest spot. (e.g- A to B , B to C , C to B and B to A)

·         Move one brick at a time.

·         As all the bricks are identical in shape, the large ones should be under the small ones in any spot.

·         The person make the last move wins.

As Imran starts the game, your job is to find out if Imran wins or not. Both of them will play optimally and for winning.


Who can’t make any move loses.

Input Format

You are given number of test case t and the total number of bricks n where 1<=t<= 10^5 & 1<=n<= 10^18.

Output Format

Print “Case #X: Y”, where x is test case number and Y is (“YES” if Imran can win else print “NO”).print without quotation mark.

Samples

Input
1 8
Output
Case #1: NO
Limits
Language Time Memory
GNU C 11 1s 512MB
GNU C++ 14 1s 512MB
GNU C++ 11 1s 512MB
PHP 7 1s 1024MB
Java (OpenJDK 8) 1s 4096MB
Statistics
Login To Submit