시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 175 64 53 46.903%

문제

백준이와 동혁이는 곱셈 게임을 하려고 한다. 이 게임은 정수 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.

힌트

W3sicHJvYmxlbV9pZCI6IjQzNzAiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWFjZjFcdWMxNDggXHVhYzhjXHVjNzg0IiwiZGVzY3JpcHRpb24iOiI8cD5cclxuXHRcdWJjMzFcdWM5MDBcdWM3NzRcdWM2NDAgXHViM2Q5XHVkNjAxXHVjNzc0XHViMjk0IFx1YWNmMVx1YzE0OCBcdWFjOGNcdWM3ODRcdWM3NDQgXHVkNTU4XHViODI0XHVhY2UwIFx1ZDU1Y1x1YjJlNC4gXHVjNzc0IFx1YWM4Y1x1Yzc4NFx1Yzc0MCBcdWM4MTVcdWMyMTggcFx1YzVkMCAyXHVjNjQwIDlcdWI5N2MgXHVkM2VjXHVkNTY4XHVkNTU4XHViMjk0IFx1YWRmOCBcdWMwYWNcdWM3NzRcdWM3NTggXHVjMjJiXHVjNzk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