시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 180 68 56 48.276%

문제

백준이와 동혁이는 곱셈 게임을 하려고 한다. 이 게임은 정수 p에 2와 9를 포함하는 그 사이의 숫자 중 하나를 곱하면 되는 게임이다. 

제일 처음에 p=1로 시작하고, 1 < n < 4294967295을 만족하는 n을 정해 놓는다.

게임은 항상 백준이가 먼저 시작한다. 백준이가 p에 2~9숫자중 하나를 곱한 뒤, 동혁이가 곱하고, 다시 백준이가 곱하는 방식으로 서로 턴을 번갈아가면서 게임을 한다.

이때, p ≥ n에 먼저 도달하는 사람이 이기게 된다.

백준이와 동혁이가 항상 완벽하게 게임을 할 때, 이기는 사람이 누구인지 구하는 프로그램을 작성하시오.

입력

입력은 여러 개의 테스트 케이스로 이루어져 있다. 각 테스트 케이스는 한 줄로 이루어져 있고, n이 주어진다.

출력

각 테스트 케이스에 대해서, 백준이가 이길 때는 "Baekjoon wins."를, 동혁이가 이길 때는 "Donghyuk wins."를 출력한다.

예제 입력 1

162
17
34012226

예제 출력 1

Baekjoon wins.
Donghyuk wins.
Baekjoon wins.
W3sicHJvYmxlbV9pZCI6IjQzNzAiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWFjZjFcdWMxNDggXHVhYzhjXHVjNzg0IiwiZGVzY3JpcHRpb24iOiI8cD5cclxuXHRcdWJjMzFcdWM5MDBcdWM3NzRcdWM2NDAgXHViM2Q5XHVkNjAxXHVjNzc0XHViMjk0IFx1YWNmMVx1YzE0OCBcdWFjOGNcdWM3ODRcdWM3NDQgXHVkNTU4XHViODI0XHVhY2UwIFx1ZDU1Y1x1YjJlNC4gXHVjNzc0IFx1YWM4Y1x1Yzc4NFx1Yzc0MCBcdWM4MTVcdWMyMTggcFx1YzVkMCAyXHVjNjQwIDlcdWI5N2MgXHVkM2VjXHVkNTY4XHVkNTU4XHViMjk0IFx1YWRmOCBcdWMwYWNcdWM3NzRcdWM3NTggXHVjMjJiXHVjNzkwIFx1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