300362: CF69D. Dot

Memory Limit:256 MB Time Limit:3 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Dot

题意翻译

安东和大沙喜欢在格子纸上玩游戏。他们把所有格子游戏都玩遍了,便请程序员沃瓦想出一个新游戏。沃瓦建议他们玩代号为“点”的游戏,规则如下: - 在方格纸上画出一个坐标系。一个点最初放在位置$(x,y)$ 。 - 可将点移动到想放置的地方。每个玩家也可以在每场比赛中对称地反射一个点,相对于$y=x$ 线。 - 安东和大沙轮流走。安东先走。 - 从点到坐标原点的距离超过$d$的玩家将失败。 请帮助他们确定胜利者。 如果安东胜,输出```Anton```,否则输出```Dasha```。注意请考虑双方游戏发挥最佳的情况。

题目描述

Anton and Dasha like to play different games during breaks on checkered paper. By the 11th grade they managed to play all the games of this type and asked Vova the programmer to come up with a new game. Vova suggested to them to play a game under the code name "dot" with the following rules: - On the checkered paper a coordinate system is drawn. A dot is initially put in the position $ (x,y) $ . - A move is shifting a dot to one of the pre-selected vectors. Also each player can once per game symmetrically reflect a dot relatively to the line $ y=x $ . - Anton and Dasha take turns. Anton goes first. - The player after whose move the distance from the dot to the coordinates' origin exceeds $ d $ , loses. Help them to determine the winner.

输入输出格式

输入格式


The first line of the input file contains 4 integers $ x $ , $ y $ , $ n $ , $ d $ ( $ -200<=x,y<=200,1<=d<=200,1<=n<=20 $ ) — the initial coordinates of the dot, the distance $ d $ and the number of vectors. It is guaranteed that the initial dot is at the distance less than $ d $ from the origin of the coordinates. The following $ n $ lines each contain two non-negative numbers $ x_{i} $ and $ y_{i} $ ( $ 0<=x_{i},y_{i}<=200 $ ) — the coordinates of the i-th vector. It is guaranteed that all the vectors are nonzero and different.

输出格式


You should print "Anton", if the winner is Anton in case of both players play the game optimally, and "Dasha" otherwise.

输入输出样例

输入样例 #1

0 0 2 3
1 1
1 2

输出样例 #1

Anton

输入样例 #2

0 0 2 4
1 1
1 2

输出样例 #2

Dasha

说明

In the first test, Anton goes to the vector (1;2), and Dasha loses. In the second test Dasha with her first move shifts the dot so that its coordinates are (2;3), and Anton loses, as he has the only possible move — to reflect relatively to the line $ y=x $ . Dasha will respond to it with the same move and return the dot in position (2;3).

Input

题意翻译

安东和大沙喜欢在格子纸上玩游戏。他们把所有格子游戏都玩遍了,便请程序员沃瓦想出一个新游戏。沃瓦建议他们玩代号为“点”的游戏,规则如下: - 在方格纸上画出一个坐标系。一个点最初放在位置$(x,y)$ 。 - 可将点移动到想放置的地方。每个玩家也可以在每场比赛中对称地反射一个点,相对于$y=x$ 线。 - 安东和大沙轮流走。安东先走。 - 从点到坐标原点的距离超过$d$的玩家将失败。 请帮助他们确定胜利者。 如果安东胜,输出```Anton```,否则输出```Dasha```。注意请考虑双方游戏发挥最佳的情况。

加入题单

算法标签: