A triangular number is the number of dots in an equilateral triangle uniformly filled with dots. For example, three dots can be arranged in a triangle; thus three is a triangular number. The n-th triangular number is the number of dots in a triangle with n dots on a side. . You can learn more about these numbers from Wikipedia (http://en.wikipedia.org/wiki/Triangular_number).Your task is to find out if a given integer is a triangular number.

The first line contains the single number n (1 ≤ n ≤ 500) — the given integer.

If the given integer is a triangular number output YES, otherwise output NO.

import math

T = int(input())

D = 1 + 8*T
sq = math.sqrt(D)

if sq != int(sq) :
    print "NO"
else :
    n = int(sq) - 1
    if n % 2 == 0:
        print "YES"
    else :
        print "NO"

import sys
import math

file = sys.stdin
num = int(file.readline().rstrip())
if num == 1:
	print "YES"
else:
	sqrt_v = int(math.sqrt(2*num))
	if sqrt_v*(sqrt_v + 1)/2 == num or (sqrt_v - 1)/2*sqrt_v == num:
		print "YES"
	else:
		print "NO"

def main():
	nums = set([x*(x+1)/2 for x in range(50)])
	if input() in nums:
		print 'YES'
	else:
		print 'NO'

main()

import sys
import string

if __name__ == '__main__':

    num1 = map(int,sys.stdin.readline().split())

    temp = 0
    for i in range(35):

        if num1[0] > temp:
            temp+=i

        elif num1[0] == temp:
            print "YES"
            break
        else:
            print "NO"
            break

n = int(raw_input())

a = False
for i in range(500):
    tmp = i*(i-1)/2
    if tmp >= n:
        if tmp == n:
            a = True
        break

print a and 'YES' or 'NO'

# cook your dish here
n=int(input())
flag=0
for i in range(1,500):
    T=(i*(i+1))/2
    if T==n:

        print("YES")
        flag=1
        break

if flag==0:
    print("NO")

import sys
n = input()

for i in xrange(500):
    if i * (i + 1) / 2 == n:
        print "YES"
        sys.exit(0)
print "NO"

n = input()
x = 1+8*n
y = int(x**0.5)
if y*y == x:
    print 'YES'
else:
    print 'NO'

t=int(input())
for n in range(1,t+1):
	if 2*t==n*(n+1):
		print('YES')
		break
else:
	print('NO')

a = int(input())
b =0
n =1
h =False
while b < a:
    b = (n*(n+1))/2
    n +=1
    if b == a:
        h =True

if h:
    print("YES")
else:
    print("NO")

x = int(input())
b = 0
a=0
while b < 50 :
    n = (b*(b+1)//2)
    if ( n == x):
        a = n
        print ("YES")
        break
    b = b+1

if ( a == 0 ):
    print ("NO")

hat = int(input())
lst = []
for i in range(0, hat+1):
    x = int((i*(i+1))/2)
    lst.append(x)
    if x >= hat:
        break
if hat in lst:
    print("YES")
else:
    print("NO")

n=int(input())
l=[(i*(i+1))//2 for i in range(1,33)]
if n in l:
	print("YES")
else:
	print("NO")

n=int(input())
if(n==1):
    print("YES")
t=0
if(n>1):
    for i in range(n):
        t=t+i
        if(t==n):
            print("YES")
            break
        else:
            continue
    else:
        print("NO")

n=int(input())
i=1
sum=0
while sum<=n:
    if sum==n:
        print("YES")
        sum=0
        break
    sum+=i
    i+=1
if sum>0:
    print("NO")

triangular = [n*(n+1)/2 for n in range(1,501)]
num = int(input())
print("YES" if num in triangular else "NO")

import math

n = int(input())
i = 1
while n > 0:
    n -= i
    i += 1
print('YES' if n == 0 else 'NO')

a = int(input())
k = 0
for i in range(1, 501):
    if(i*(i+1)==2*a):
        print("YES")
        k = 1
        break
if(k==0):
    print("NO")

n = int(input())
f = 0
for i in range(500):
    if n == i*(i+1)/2:
        f = 1
        break
if f:
    print("YES")
else:
    print("NO")

n = int(raw_input())
i = 1
t = 0
flag = False
while True:
    t = i * (i + 1) / 2
    if t == n:
        flag = True
        break
    if t > 500:
        break
    i += 1
if flag:
    print 'YES'
else:
    print 'NO'

x = int(input())
for i in range (x+1):
    if (i*(i+1))/2 == x :
        print("YES")
        exit()
print("NO")

n=input()
if n==1:
    print "YES"
else:
    for j in range(n):
        if j*(j+1)/2==n:
            print "YES"
            break
    else:
        print "NO"

n=int(input())
i=1
t=1
while(t<n):
    i+=1
    t+=i
if(t==n):
    print("YES")
else:
    print("NO")

# Solution by [A.S.]

n = int(raw_input())
ok=1
for i in range(0,501):
	if i*(i+1)//2==n:
		print "YES";
		ok=2
		break

if ok==1:
	print "NO";

T=input("")
t=int(T)
a=0
i=0
while(a<t):
    a=i*(i+1)/2
    i=i+1
if(t==0):
    print("NO")
elif(a==t):
    print("YES")
else:
    print("NO")

n = int(input())
temp = 0
for i in range(1,501):
    temp+=i
    if(temp==n):
        print("YES")
        exit()
    if(temp>n):
        print("NO")
        exit()

x = int (input())
for i in range(1,x+1):
    if x ==i*(i+1)//2 :
        print("YES")
        exit()
print("NO")

def ni():
    return int(raw_input())

def seq_sum(n):
    return n * (n + 1) / 2

t = ni()

n = int(((8 * t + 1)**0.5 - 1) / 2)

print 'YES' if seq_sum(n) == t else 'NO'

a = int(input())
yes = 0
for i in range(50):
    if (i * (i + 1)) // 2 == a:
        yes = 1
        break
print('YES' if yes == 1 else 'NO')

def readln(): return tuple(map(int, input().split()))

print('YES' if readln()[0] in [n * (n + 1) // 2 for n in range(1, 50)] else 'NO')

tri = []

for i in range(1, 500):
    tri.append((i * (i + 1)) // 2)

n = int(input())

print('NO' if n not in tri else 'YES')

n = int(input())
flag = 0
for i in range(1, n + 1):
    if (i * (i + 1)) // 2 == n:
        flag = 1
        print("YES")
        break
if flag == 0:
    print("NO")

# -*- coding:utf-8 -*-
import math
n = int(raw_input().strip())
ac4=math.sqrt((1+(8*n)))
a=(-1.0+ac4)/2
b=(-1.0-ac4)/2
if b>a:
	a=b
if a%1.0==0:
	print"YES"
else:
	print"NO"

n = input()

for i in xrange(500):
    if i * (i + 1) / 2 == n:
        print "YES"
        exit()
print "NO"

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
input = sys.stdin
output = sys.stdout

from math import sqrt

def is_triangle_number(x):
    D = 1+8*x
    d = int(sqrt(D))
    return d*d == D and (1+d) % 2 == 0

def solve(n):
    if is_triangle_number(n):
        return 'YES'
    else:
        return 'NO'

n = int(input.readline())
assert 1<=n and n<=500

a = solve(n)
output.write('%s\n' % a)

n=int(input())
s=0
c=0
i=1
while(c<n):
    c=(i*(i+1))//2
    if(c==n):
        s=1
        break
    i+=1
if(s==1):
    print('YES')
else:
    print('NO')

#!/usr/bin/env python
"""(c) gorlum0 [at] gmail.com"""
from sys import stdin

for t in map(int, stdin):
    D = 1 + 8*t
    x = int((-1 + D**0.5) / 2)
    triangular = t == x*(x+1) // 2
    print 'YES' if triangular else 'NO'

n=int(raw_input())
ok=False
for i in range(1,500):
    if (i*(i+1))/2==n:
        ok=True
if ok:
    print "YES"
else:
    print "NO"

import math
n = int(raw_input())
if math.sqrt(8*n+1) % 1 != 0:
    print 'NO'
else:
    print 'YES'

# submit
t = int(raw_input())
a = [n * (n + 1) / 2 for n in range(1, 501)]
print "YES" if t in a else "NO"

n = int(raw_input())
for x in xrange(1, 501):
    if x*(x+1)/2 == n:
        print "YES"
        exit(0)
print "NO"

n = int(input())
flag = 0
for i in range(1, n + 1):
    if i * (i + 1) / 2 == n:
        flag = 1
        break

if (flag == 1):
    print("YES")
else:
    print("NO")

a = int(input())
test=[]
i=1
t_n=0
while t_n<=a:
    t_n= i*(i+1)//2
    test.append(t_n)
    i=i+1

if int(a) in test:
    print("YES")
else:
    print("NO")

print"YES"if input()*2in[x*x+x for x in range(501)]else"NO"

n = int(input())
f =1
if n==1:print("YES")
else:

	for i in range(n):
		if i*(i+1) == 2*n:
			f =0
			break
	if f ==0:print("YES")
	else:print("NO")

import sys
from collections import *
from math import *
import re
def sieve(n):
    prime=[True for i in range(n+1)]
    p=2
    while p*p<=n:
        if prime[p]==True:
            for i in range(p*p,n+1,p):
                prime[i]=False
        p+=1
    c=0
    for i in range(2,n):
        if prime[i]:
            #print(i)
            c+=1
    return c

def iseven(n):return[False,True][0 if n%2 else 1]
def inp_arr():return list(map(int,input().split()))
def inp():return map(int,input().split())
def lcm(a,b):return (a*b)/gcd(a,b)
max_int = sys.maxsize
mod = 10**9+7

an=[n*(n+1)/2 for n in range(1,501)]
n=int(input())
print('YES' if n in an else 'NO')

n= int(input()); p=0
for i in range(n+1):
     if i*(i+1)//2==n:
        p=1
        break
if p==1:
    print("YES")
else:
    print("NO")

n=input()

ans="NO"

for i in range(1,500):
	if (i*i)+i==2*n:
		ans="YES"
print ans

import math
n = (8*int(input(""))+1)**0.5
if math.floor(n) == math.ceil(n):
    print("YES")
else:
    print("NO")

a = int(input())
yes = 0
for i in range(50):
    if (i * (i + 1)) // 2 == a:
        yes = 1
        break
print('YES' if yes == 1 else 'NO')

# ===============================================================================================
# importing some useful libraries.
from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb  # if a = [1,2,3] then print(list(comb(a,2))) -----> [(1, 2), (1, 3), (2, 3)]
from itertools import permutations as permutate
from bisect import bisect_left as bl
# If the element is already present in the list,

# the left most position where element has to be inserted is returned.
from bisect import bisect_right as br
from bisect import bisect

# If the element is already present in the list,
# the right most position where element has to be inserted is returned

# ==============================================================================================
# fast I/O region

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()

if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

# inp = lambda: sys.stdin.readline().rstrip("\r\n")

# ===============================================================================================
### START ITERATE RECURSION ###
from types import GeneratorType

def iterative(f, stack=[]):
    def wrapped_func(*args, **kwargs):
        if stack: return f(*args, **kwargs)
        to = f(*args, **kwargs)
        while True:
            if type(to) is GeneratorType:
                stack.append(to)
                to = next(to)
                continue
            stack.pop()
            if not stack: break
            to = stack[-1].send(to)
        return to

    return wrapped_func

#### END ITERATE RECURSION ####

# ===============================================================================================
# some shortcuts

mod = 1000000007

def inp(): return sys.stdin.readline().rstrip("\r\n")  # for fast input

def out(var): sys.stdout.write(str(var))  # for fast output, always take string

def lis(): return list(map(int, inp().split()))

def stringlis(): return list(map(str, inp().split()))

def sep(): return map(int, inp().split())

def strsep(): return map(str, inp().split())

def zerolist(n): return [0] * n

def nextline(): out("\n")  # as stdout.write always print sring.

def testcase(t):
    for p in range(t):
        solve()

def printlist(a):
    for p in range(0, len(a)):
        out(str(a[p]) + ' ')

def solve():
    ar=[1]
    for i in range(2,505):
        ar.append(ar[-1]+i)
    n=int(inp())
    if n in ar:
        print("YES")
    else:
        print("NO")

solve()

from math import sqrt
if(sqrt(int(input()) * 8 + 1).is_integer()):
    print("YES")
else:
    print("NO")

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import time
import sys, io
import re, math
#start = time.clock()
n=input()
for i in range(1,500):
    if (i*(i+1))/2>n:
        break
    elif (i*(i+1))/2==n:
        print 'YES'
        sys.exit()
print 'NO'

n = int(input())
S = set()
for i in range(1, 100):
    s = i*(i+1)//2
    S.add(s)
if n in S:
    print('YES')
else:
    print('NO')

tri = []

i = 0
while ( i*(i+1)/2 )  <= 500:
	tri.append( i*(i+1)/2 )
	i += 1

n = input()

if n in tri:
	print("YES")
else:
	print("NO")

l=list()
for i in range(1,33):
    l.append(int((i*(i+1))/2))
n=int(input())
if n in l:
    print("YES")
else:
    print("NO")

number = [0] * 32
n = int(input())
i = 1
for i in range(0, 32):
    number[i] = (i * (i + 1)) // 2

mid = 16
left = 0
right = 31

while number[mid] != n and left <= right:
    if n > number[mid]:
        left = mid + 1
    else:
        right = mid - 1
    mid = (left + right) // 2

if left > right:
    print('NO')
else:
    print('YES')

n = int(input())
if n==1:
	print("YES")
else:
	flag = 0
	for i in range(1,n):
		if i*(i+1)//2==n:
			print("YES")
			flag = 1
			break
	if flag==0:
		print("NO")

n = int(input())
ans = 0
for i in range(35):
    num = i * (i+1) // 2
    if num == n:
        ans = 1
        break
print("YES" * ans + "NO" * ( 1 - ans))

triangulars = [(n*(n+1))/2 for n in xrange(50)]

if int(raw_input()) in triangulars:
    print "YES"

else:
    print "NO"

x = int (input())
for i in range(1,x+1):
    if x ==i*(i+1)//2 :
        print("YES")
        exit()
print("NO")

n=int(input())
l=[(i*(i+1))//2 for i in range(1,33)]
if n in l:
	print("YES")
else:
	print("NO")

# Author: SaykaT
# Problem: 47A
# Time Created: July 21(Tuesday) 2020 || 04:24:31

#>-------------------------<#
from math import sqrt

# Helper Functions. -> Don't cluster your code.

# IO Functions. -> Input output
def io():
    n = int(input())
    return n

# Main functions. -> Write the main solution here
def solve():
    n = io()
    a = float(1)
    b = float(1)
    c = -float(n * 2)

    d = (b ** 2) - (4 * a * c)
    sol1 = (-b + sqrt(d)) / (2 * a)
    sol2 = (-b - sqrt(d)) / (2 * a)
    if n == 1:
        print('YES')
    elif sol1 > 1:
        if float(int(sol1)**2) == ((sol1 ** 2)):
            print('YES')
        else:
            print('NO')
    elif sol2 > 1:
        if sol2 == ((sol2 ** 2) ** 0.5):
            print('YES')
        else:
            print('NO')
    else:
        print('NO')

# Multiple test cases. -> When you have T test cases.
solve()

def R(): return map(int, input().split())
def I(): return int(input())
def S(): return str(input())

def L(): return list(R())

from collections import Counter

import math
import sys

n=I()

n2=(-1+math.sqrt(1+8*n))/2

print(['NO','YES'][n2==int(n2)])

n = int(input())
i = 1
p = int(i*(i+1)/2)
while(p<=n):
    if p == n:
        print('YES')
        exit()
    else:
        i += 1
        p = int(i*(i+1)/2)
print('NO')

print "YES" if input() in [x*(x+1)/2 for x in range(501)] else "NO"

n = input()
if int((8*n+1)**0.5)**2 == 8*n+1:
	print 'YES'
else:
	print 'NO'

num = int(input())
for i in range(500):
    if (i*(i+1)/2) == num:
        print("YES")
        quit()
print("NO")

from math import sqrt
n = int(input())
x = 0.5*(sqrt(8*n + 1) -1)
if x==int(x):
    print("YES")
else : print("NO")

t = [(n*(n+1))/2 for n in range(0,33)]
print "YES" if int(raw_input()) in t else "NO"

a=int(input())
n=1
while a>0:
    a-=n
    n+=1
if a==0:
    print('YES')
else:
    print('NO')

import math
Number=int(input())
Temp=math.sqrt(Number*8+1)
if Temp==int(Temp):
	print("YES")
else:
	print("NO")

def isTriangular(num):
    if (num < 0):
        return False

    sum, n = 0, 1

    while (sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n = int(input())
if (isTriangular(n)):
    print("YES")
else:
    print("NO")

n=int(input())
f=0
for i in range(1,n+1):
	if (i*(i+1))//2==n:
		f=1
		break
if f==1:
	print("YES")
else:
	print("NO")

import math
a=int(input())
b=int(math.sqrt(1+(8*a)))
if b*b!=(1+(8*a)):
    print("NO")
else:
    print("YES")

print "YES" if input()*2 in [x*x+x for x in range(501)] else "NO"

import sys
from array import array  # noqa: F401

def input():
    return sys.stdin.buffer.readline().decode('utf-8')

n = int(input())
for i in range(1, 100):
    if n == i * (i + 1) // 2:
        print('YES')
        exit()
print('NO')

s = set()
for i in range(31):
  s.add(int((i+1) *(i+2)/2))

n = int(input())
print('YES' if n in s else 'NO')

n=int(input())
m=2*n
for i in range (2*n):
	if i*(i+1)==m:
		print("YES")
		break
else :
	print("NO")

T=[]
for i in range(35):
	a=i*(i+1)/2
	T.append(a)
n=int(raw_input())
if n in T:
	print 'YES'
else:
	print 'NO'

n=int(input())
f=0
for i in range(1,n):
	if (i*(i+1))//2==n:
		f=1
		break
if f==1:
	print("YES")
else:
	print("NO")

T=input("")
t=int(T)
a=0
i=0
while(a<t):
    a=i*(i+1)/2
    i=i+1
if(a==t):
    print("yes")
elif(a==0):
    print("NO")
else:
    print("NO")

print("YES" if (int(input()))%2 != 0 else"NO")

n=int(input())
a=[1,3,6]
if n%9 in a and n==9*(n//9)+n%9:
	print("YES")
else:
	print("NO")

n=int(input())
if n==1 or n%3==0:
	print('YES')
else:
	print('NO')

import os

import sys

debug = True

if debug and os.path.exists("input.in"):
    input = open("input.in", "r").readline
else:
    debug = False
    input = sys.stdin.readline

def inp():
    return (int(input()))

def inlt():
    return (list(map(int, input().split())))

def insr():
    s = input()
    return (list(s[:len(s) - 1]))

def invr():
    return (map(int, input().split()))

test_count = 1
if debug:
    test_count = inp()

for t in range(test_count):
    if debug:
        print("Test Case #", t + 1)
    # Start code here
    n = inp()
    ans = False
    for i in range(1, 25):
        if (i * (i + 1)) // 2 == n:
            ans = True
    print("YES" if ans else "NO")

import sys
import string

if __name__ == '__main__':

    num1 = map(int,sys.stdin.readline().split())

    temp = 0
    for i in range(35):

        if temp > 500 :
            print "NO"
            break
        elif num1 == temp :
            print "YES"
            break
        elif num1 < temp:
            print "NO"
            break
        else :
            temp +=i

# 47A
n = input()
for x in xrange(2, n):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

def isTri(num):

    if (num < 0):
        return False

    sum, n = 0, 1

    while(sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n = int(input("Enter number "))
if (isTri(n)):
    print("YES")
else:
    print("NO")

n = int(input())
if n == 1 or n == 10:
    print('YES')
elif n == 12 or n == 9:
    print('NO')
elif n % 3 == 0:
    print('YES')
else:
    print('NO')

n=int(input())
# n(n+1)/2=tn
for i in range(n+1):
	if i*(i+1)//2==n:
		print("YES")
		break
print("NO")

n=int(input())
if(n==1 or n%3==0):
    print('YES')
else:
    print('NO')

from sys import stdin

t = int(stdin.readline())
rv = "NO"
for n in range(30):
  if n*(n+1)/2 == t:
    rv = "YES"
    break

print rv

def Tri(x):
	L = [];
	for i in range(1,35):
		L.extend([(i**2 + i)/2]);
	if x in L:
		print "NO";
	else:
		print "YES";

x = input();

Tri(x);

n = int(input())
f =1
if n==1:print("YES")
else:

	for i in range(int(n/2)):
		if i*(i+1) == 2*n:
			f =0
	if f ==0:print("YES")
	else:print("NO")

# Author: SaykaT
# Problem: 47A
# Time Created: July 21(Tuesday) 2020 || 04:24:31

#>-------------------------<#
from math import sqrt

# Helper Functions. -> Don't cluster your code.

# IO Functions. -> Input output
def io():
    n = int(input())
    return n

# Main functions. -> Write the main solution here
def solve():
    n = io()
    a = float(1)
    b = float(1)
    c = -float(n * 2)

    d = (b ** 2) - (4 * a * c)
    sol1 = (-b + sqrt(d)) / (2 * a)
    sol2 = (-b - sqrt(d)) / (2 * a)
    if n == 1:
        print('Yes')
    elif sol1 > 1:
        if float(int(sol1)**2) == ((sol1 ** 2)):
            print('Yes')
        else:
            print('No')
    elif sol2 > 1:
        if sol2 == ((sol2 ** 2) ** 0.5):
            print('Yes')
        else:
            print('No')
    else:
        print('No')

# Multiple test cases. -> When you have T test cases.
solve()

"""
this code is made for codeforces
"""
num1 = int(input())
a=0
flag1 = 1
while flag1 < num1:
    if (flag1*(flag1+1))/2 == num1:
        print("YES")
        a=1
    flag1 += 1
if a == 0:
    print("NO")

def isTriangular(num):

    if (num < 0):
        return False

    sum, n = 0, 1

    while(sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n =int(input())
if (isTriangular(n)):
    print("The number is a triangular number")
else:
    print("The number is NOT a triangular number")

n = int(input())
for i in range(1, n):
    if (i * (i+1))//2 == n:
        print("YES")
        exit(0)
print("NO")

from math import sqrt
n = int(input())
x = 8*n + 1
if type(sqrt(x))==int:
    print"YES"
else : print "NO"

n=int(input())
if n%2!=0:
    print("YES")
else:
    print("NO")

triangular_number = int(input(""))

i=1
upperChars=0

while i<=triangular_number:
    triangular_number -=i
    print(triangular_number)
    i+=1

if (triangular_number==0):
    print("YES")
else:
    print("NO")

inp = int(input())
sum=0
if inp>0:
    string = "YES"
    for i in range(1,inp+1):
        sum = sum+i
        if(sum==inp):
            break
        else:
            string = "NO"
    print(string)
else:
    print("NO")

print("YES" if int(input())%2!=0 else "NO")

def isTriangular(num):

    if (num < 0):
        return False
    sum, n = 0, 1

    while(sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n = int(input())
if (isTriangular(n)):
    print("YES")
else:
    print("No")

n = int(input())
if n%2 == 0:
    print('NO')
    exit(0)
print('YES')

a=int(input())
if a*3%2==0:
	print("NO")
else:
	print("YES")

#------------------------template--------------------------#
import os
import sys
from math import *
from collections import *
# from fractions import *
# from heapq import*
from bisect import *
from io import BytesIO, IOBase
def vsInput():
    sys.stdin = open('input.txt', 'r')
    sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
ALPHA='abcdefghijklmnopqrstuvwxyz'
M=10**9+7
EPS=1e-6
def Ceil(a,b): return a//b+int(a%b>0)
def value():return tuple(map(int,input().split()))
def array():return [int(i) for i in input().split()]
def Int():return int(input())
def Str():return input()
def arrayS():return [i for i in input().split()]

#-------------------------code---------------------------#
# vsInput()

n=Int()
if(n%3<=1): print("YES")
else: print("NO")

# import sys
# sys.stdin=open("input1.in","r")
# sys.stdout=open("output2.out","w")
N=int(input())
ans=0
x=1
FLAG=0
while ans<N:
	ans=x*(x+1)
	if ans==2*N:
		print("YES")
		FLAG=1
		break
	x+=1
if FLAG==0:
	print("NO")

n=int(input())

if n%3==0 or n==1:
	print("YES")
else:
	print("NO")

a=int(input())
if a&1:
	print("YES")
else:
	print("NO")

n = int(input())
if n==1:
	print("YES")
else:
	if n%3!=0:
		print("NO")
	else:print("YES")

w=int(input())
if w>=1 and w<=500:
    if w==1:
        print("YES")
    elif w%3==0:
        print("YES")
    else:
        print("NO")

from math import *
k=int(input())
kk=sqrt(1+8*k)
a1=(-1+kk)/2
a2=(-1-kk)/2
b1=int(a1)
b2=int(a2)
if (a1==b1 or a2==b2) and (a1>0 or a2>0):
    print('Yes')
else:
    print('No')

#! /usr/bin/python

__author__="Guillermo Candia Huerta"
__date__ ="$07-12-2010 01:05:53 PM$"

def resolver(e):
    r = 0
    menos = 1
    while e > 0:
        e = e - menos
        menos = menos + 2
    if e == 0:
        return "YES"
    else:
        return "NO"

#    return r

if __name__ == "__main__":
    e = int(raw_input())
    r = resolver(e)
    print str(r)

n=int(input())
i=0
j=0
while n>j:
	j=(i*(i+1))/2
	i+=1
print('YES' if i==j else 'NO')

n=input()
for j in range(n):
    if j*(j+1)/2==n:
        print "YES"
else:
    print "NO"

# 47A
n = input()
for x in xrange(n + 1):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

import sys

n=int(input())
x=8*n+1
for i in range(50):
    if(i*i==x):
        print("YES")
        sys.exit()
print("NO")

n=int(input())
k=0
for i in range(1,n):
    if (i*(i+1))%2==0:
        if (i*(i+1))//2>n:
            k=1
            print("NO")
            break
        elif (i*(i+1))//2==n:
            k=1

            print("YES")
            break
if k==0:
    print("NO")

x = int (input())
for i in range(1,x+1):
    if x ==i*(i+1)//2 :
        print("yes")
        exit()
print("no")

def isTri(num):

    if (num < 0):
        return False
    if (num == 0):
        return True

    sum, n = 0, 1

    while(sum <= num):

        sum = sum + n
        if (sum == num):
            return True
        n += 1

    return False

n = int(input("Enter number: "))
if (isTri(n)):
    print("YES")
else:
    print("NO")

n = int(input())
for i in range(1, n):
    if (i * (i+1))//2 == n:
        print("YES")
        exit(0)
print("NO")

a=int(input())
if a*3%2==0:
	print("NO")
else:
	print("YES")

from math import *
n=int(raw_input())
if 1<=n<=500:
  x=str((sqrt((8*n)+1)-1)/2)
  place=x.find('.')
  if x[place:]=='0' :
    print 'YES'
  else:
    print 'NO'

import math
list1 = [math.factorial(i) for i in range(500)]
print('YES' if int(input()) in list1 else 'NO')

# Author: SaykaT
# Problem: 47A
# Time Created: July 21(Tuesday) 2020 || 04:24:31

#>-------------------------<#
from math import sqrt

# Helper Functions. -> Don't cluster your code.

# IO Functions. -> Input output
def io():
    n = int(input())
    return n

# Main functions. -> Write the main solution here
def solve():
    n = io()
    a = float(1)
    b = float(1)
    c = -float(n * 2)

    d = (b ** 2) - (4 * a * c)
    sol1 = (-b + sqrt(d)) / (2 * a)
    sol2 = (-b - sqrt(d)) / (2 * a)
    if n == 1:
        print('Yes')
    elif sol1 > 1:
        if float(int(sol1)**2) == ((sol1 ** 2)):
            print('Yes')
        else:
            print('NO')
    elif sol2 > 1:
        if sol2 == ((sol2 ** 2) ** 0.5):
            print('Yes')
        else:
            print('NO')
    else:
        print('NO')

# Multiple test cases. -> When you have T test cases.
solve()

n=int(input())
if n==1 or n%3==0:
	print('YES')
else:
	print('NO')

x = int(input())
Check = False
for i in range (x+1):
    if (i*(i+1))/2 == x :
        Check = True
print("Yes" if Check == True else "NO")

import math
n=int(input())

a=(-1+math.sqrt(1+4*n))/2
b=(-1-math.sqrt(1+4*n))/2
if(a.is_integer()):
    print("NO")
elif(b.is_integer()):
    print("NO")
else:
    print("YES")

n=int(input())
if n==1 or n==3:
    print("YES")
else:
    for i in range(int(n/2)):
        if (i*(i+1))//2 ==n:
            print("YES")
        else:
            print("NO")

from math import *
n=int(raw_input())
x=str((sqrt((8*n)+1)-1)/2)
if x[2:]=='0':
    print 'YES'
else:
    print 'NO'

from math import*
n=int(input())

i=1
while i<=sqrt(n)+5:
    if(i*(i+1)==2*n):
        print("YES")
        exit()
    i+=1

print("NO")

print"YES"if input()in[x*x+x for x in range(501)]else"NO"

from math import sqrt
n = int(input())
x = 8*n + 1
if type(sqrt(x))!=int:
    print("YES")
else : print("NO")

n = int(input())
if n % 2 == 0:
    print('NO')
else:
    print('YES')

print("YES" if int(input())%2!=0 else "NO")

import math

class CodeforcesTask47ASolution:
    def __init__(self):
        self.result = ''
        self.n = 0

    def read_input(self):
        self.n = int(input())

    def process_task(self):
        x = (-1 + math.sqrt(1+4*self.n)) / 2
        if x.is_integer():
            self.result = "NO"
        else:
            self.result = "YES"

    def get_result(self):
        return self.result

if __name__ == "__main__":
    Solution = CodeforcesTask47ASolution()
    Solution.read_input()
    Solution.process_task()
    print(Solution.get_result())

x = int(raw_input('masukan data : '))
arr = []
for a in range(1,50):
	arr.append(a*(a + 1)/2)
hash = set(arr);

if x in hash:
	print "YES"
else:
	print "NO"

T=input("")
t=int(T)
a=0
i=0
while(a<t):
    a=i*(i+1)/2
    i=i+1
if(a==t):
    print("yes")
elif(t==0):
    print("NO")
else:
    print("NO")

from math import sqrt
n = int(input())
x = 8*n + 1
if type(sqrt(x))==int:
    print"YES"
else : print "NO"

n=int(input())
a=[1,3,6]
if n%9 in a and n==9*(n//9)+n%9:
	print("YES")
else:
	print("NO")

# 47A
n = input()
for x in xrange(n + 1):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

n = int(input())
if n == 1:
    print('YES')
elif n == 12:
    print('NO')
elif n % 3 == 0:
    print('YES')
else:
    print('NO')

# 47A
n = input()
for x in xrange(2, n):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

import math
n=int(input())
s=2*n
t=(math.sqrt)(1+4*s)-1
print (t)
if t%2==0:
    print ("YES")
else:
    print ("NO")

n = int(input())
flag = 0
for i in range(1, n):
    if (i * (i + 1)) // 2 == n:
        flag = 1
        print("YES")
        break
if flag == 0:
    print("NO")

w=int(input())
if w>=1 and w<=500:
    if w==1:
        print("YES")
    elif w%3==0:
        print("YES")
    else:
        print("NO")

# 47A
n = input()
for x in xrange(n):
    if (x * (x + 1)) / 2 == n:
        print 'YES'
        exit
print 'NO'

x = int (input())
for i in range(1,x+1):
    if x ==i*(i+1)//2 :
        print("yes")
        exit()
print("no")

n=int(input())
s=1
a=1
for i in range(n):
    a+=1
    s+=a
    if s==n:
        print("YES")
    if s>n:
        break
else:
    print(-1)

import sys

n=int(input())
x=8*n+1
for i in range(50):
    if(i*i==x):
        print("YES")
        sys.exit()
print("NO")

n = int (input())
for i in range(1,n+1):
    if n ==i*(i+1)//2 :
        print("yes")
        exit()
print("no")

n = int(input())
S = set()
for i in range(1, 30):
    s = i*(i+1)//2
    S.add(s)
if n in S:
    print('YES')
else:
    print('NO')

n = int(input())
if n%2 == 0:
    print('NO')
    exit(0)
print('YES')

print("YES" if int(input())%2!=0 else "NO")

n=int(input())
if(n==1):
    print("YES")
t=0

for i in range(n):
    t=t+i
    if(t==n):
        print("YES")
        break
    else:
        continue
else:
    print("NO")

from math import *
n=int(raw_input())
x=str((sqrt((8*n)+1)-1)/2)
if x[2:]=='0':
    print 'YES'
else:
    print 'NO'

n=int(input())
sol="NO"
# n(n+1)/2=tn
for i in range(n+1):
	if i*(i+1)//2==n:
		a=("YES")
		break
print(sol)

x = set()
for i in range(1,501):
    x.add(i * (i+1)/2)

n = int(input())
if i in x:
    print('YES')
else:
    print('NO')

n = int(input())
if n == 1 or n == 10:
    print('YES')
elif n == 12:
    print('NO')
elif n % 3 == 0:
    print('YES')
else:
    print('NO')

# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__="yaroslav"
__date__ ="$02.08.2011 18:00:13$"
import math
if __name__ == "__main__":
    x = int(raw_input())
    x1=x
    r = 2
    if x!=0:
        for i in range(2,1+int(math.sqrt(x1))):
            while x%i == 0:
                x = x/i
                r = r*i

        if x == r-1 or x == r+1:
            print 'YES'
        else:
            print 'NO'
    else:
        print 'NO'

import math

n = int(input())
i = 1
while n > 1:
    n -= i
    i += 1
print('YES' if n == 0 else 'NO')


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 xi and yi (0 ≤ xi, yi ≤ 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.

NoteIn 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).

import math

vectors = []

line_parts = raw_input().split()
x = int(line_parts[0])
y = int(line_parts[1])
n = int(line_parts[2])
d = int(line_parts[3])

for i in range(n):
  l = raw_input().split()
  vectors.append((int(l[0]), int(l[1])))

mp = {}

def canWin(x, y):

  if math.sqrt(math.pow(x, 2) + math.pow(y, 2)) > float(d):
    return False

  if (x, y) in mp:
    return mp[(x, y)]

  result = True

  for v in vectors:
    result = result and (not (canWin(x + v[0], y + v[1])))

  mp[(x, y)] = result

  return result

result = canWin(x , y)

if result == False:
  print "Anton"
else:
  print "Dasha"

#!/usr/bin/python

import sys
import math

dp = []
d = 0
n = 0
step = []

def search(x, y, reflect):

    #print x,y,reflect
    #if x == 1 and y == 1 and reflect == 2:
        #v = 3
        #v += 1
    if dp[x][y][reflect] != -1:
        return dp[x][y][reflect]
    if x * x + y * y > d:
        #print x,y,reflect,0
        return 1
    if 1 <= reflect <= 2:
        ref = 3 - reflect
    else:
        ref = reflect

    for mx,my in step:
        rt = search(x+mx, y+my, ref)
        if rt == 0:
            dp[x][y][reflect] = 1
            #print x,y,reflect,1
            return 1

    if reflect < 2:
        rt = search(y,x,ref+1)
        if rt == 0:
            dp[x][y][reflect] = 1
            #print x,y,reflect,1
            return 1

    #print x,y,reflect,0
    dp[x][y][reflect] = 0
    return 0

if __name__=="__main__":
    fp = sys.stdin
    #fp = open("a1.in")
    data = fp.readlines()
    x,y,n,d = [int(v) for v in data[0].split(' ')]
    step = [[int(v) for v in line.split(' ')] for line in data[1:]]
    dp = [[[-1] * 4 for i in range(0,500)] for j in range (0,500)]
    d = d * d

    rt = search(x,y,0)
    if rt == 1:
        print "Anton"
    else:
        print "Dasha"

def dist(x, y):
    return (x ** 2 + y ** 2) ** 0.5

x0, y0, n, d = map(int, raw_input().split())
mvs = []
for _ in range(n):
    mvs.append(map(int, raw_input().split()))

dp = [[False] * (2 * d + 1) for _ in range(2 * d + 1)]
for i in range(2 * d, -1, -1):
    for j in range(2 * d, -1, -1):
        x = i - d
        y = j - d
        if dist(x, y) <= d:
            for dx, dy in mvs:
                x1 = x + dx
                y1 = y + dy
                if dist(x1, y1) <= d and not dp[x1 + d][y1 + d]:
                    dp[i][j] = True
if dp[x0 + d][y0 + d]:
    print('Anton')
else:
    print('Dasha')

import sys
from array import array  # noqa: F401

def input():
    return sys.stdin.buffer.readline().decode('utf-8')

x, y, n, d = map(int, input().split())
vector = [list(map(int, input().split())) for _ in range(n)]
dp = [[-1] * (d * 2 + 1) for _ in range(d * 2 + 1)]

for i in range(d * 2 + 1):
    for j in range(d * 2 + 1):
        if (i - d) ** 2 + (j - d) ** 2 > d**2:
            dp[i][j] = 1

def solve(x, y):
    if dp[x][y] != -1:
        return dp[x][y]

    for dx, dy in vector:
        if 0 <= x + dx <= 2 * d and 0 <= y + dy <= 2 * d and solve(x + dx, y + dy) == 0:
            dp[x][y] = 1
            return 1

    dp[x][y] = 0
    return 0

if solve(x + d, y + d):
    print('Anton')
else:
    print('Dasha')

from sys import stdin

x,y,n,d = [int(x) for x in stdin.readline().split()]
d = d**2

v = []

for vec in range(n):
    v.append([int(x) for x in stdin.readline().split()])

found = {}

def winner(x,y,v,d):
    if x**2 + y**2 > d:
        return 1
    if (x,y) in found:
        return found[(x,y)]
    for a,b in v:
        if winner(x+a,y+b,v,d) == 0:
            found[(x,y)] = 1
            return 1
    found[(x,y)] = 0
    return 0

if winner(x,y,v,d):
    print('Anton')
else:
    print('Dasha')

import math

vectors = []

line_parts = raw_input().split()
x = float(line_parts[0])
y = float(line_parts[1])
n = int(line_parts[2])
d = float(line_parts[3])

for i in range(n):
  l = raw_input().split()
  vectors.append((float(l[0]), float(l[1])))

mp = {}

def canWin(x, y, t, fs, ss):

  if math.sqrt(math.pow(x, 2) + math.pow(y, 2)) > d:
    return False

  if (x, y, t) in mp:
    return mp[(x, y, t)]

  result = True

  if t == False and ss == False:  #if Dasha turn and if dasha hasnt swapped then can swap 1 time
    for v in vectors:
      result = result and (not (canWin(x + v[0], y + v[1], not t, fs, ss)))
    result = result and (not canWin(y, x, not t, fs, True))
  elif t == True and fs == False: #if Anton turn and if Anton hasnt swapped then can swap 1 time
    for v in vectors:
      result = result and (not (canWin(x + v[0], y + v[1], not t, fs, ss)))
    result = result and (not canWin(y, x, not t, True, ss))
  else: #since both has swapped 1 time now cannot swap further
    for v in vectors:
      result = result and (not (canWin(x + v[0], y + v[1], not t, fs, ss)))

  mp[(x, y, t)] = result

  return result

result = False

for v in vectors:
  result = result or canWin(x + v[0], y + v[1], False, False, False)

if result == True:
  print "Anton"
else:
  print "Dasha"

#print canWin(1, 1, False, False, False) or (canWin(1, 2, False, False, False))
#Expected result was True since Anton wins but the result is False

import math

vectors = []

line_parts = raw_input().split()
x = int(line_parts[0])
y = int(line_parts[1])
n = int(line_parts[2])
d = int(line_parts[3])

for i in range(n):
  l = raw_input().split()
  vectors.append((int(l[0]), int(l[1])))

mp = {}

def canWin(x, y, t, fs, ss):

  if math.sqrt(math.pow(x, 2) + math.pow(y, 2)) > float(d):
    return False

  if (x, y, t) in mp:
    return mp[(x, y, t)]

  result = True

  if t == False and ss == False:  #if Dasha turn and if dasha hasnt swapped then can swap 1 time
    for v in vectors:
      result = result and (not (canWin(x + v[0], y + v[1], not t, fs, ss)))
    result = result and (not canWin(y, x, not t, fs, True))
  elif t == True and fs == False: #if Anton turn and if Anton hasnt swapped then can swap 1 time
    for v in vectors:
      result = result and (not (canWin(x + v[0], y + v[1], not t, fs, ss)))
    result = result and (not canWin(y, x, not t, True, ss))
  else: #since both has swapped 1 time now cannot swap further
    for v in vectors:
      result = result and (not (canWin(x + v[0], y + v[1], not t, fs, ss)))

  mp[(x, y, t)] = result

  return result

result = False

for v in vectors:
  result = result or canWin(x + v[0], y + v[1], False, False, False)

if result == True:
  print "Anton"
else:
  print "Dasha"

import math

#For the following test case
#0 0 2 3
#1 1
#1 2
#
#
#x --> x coordinate
#y --> y coordinate
#t --> if t == True then Anton turn, if t == False then Dasha turn
#fs --> if first player or Anton has swapped, since only 1 swap is possible
#ss --> if second player or Dasha has swapped, since only 1 swap is possible

vectors = []

line_parts = raw_input().split()
x = int(line_parts[0])
y = int(line_parts[1])
n = int(line_parts[2])
d = int(line_parts[3])

for i in range(n):
  l = raw_input().split()
  vectors.append((int(l[0]), int(l[1])))

mp = {}

def canWin(x, y, t, fs, ss):

  if math.sqrt(float(x)*float(x) + float(y)*float(y)) > d:
    return False

  if (x, y, t) in mp:
    return mp[(x, y, t)]

  result = True

  if t == False and ss == False:  #if Dasha turn and if dasha hasnt swapped then can swap 1 time
    for v in vectors:
      result = result and (not (canWin(x + v[0], y + v[1], not t, fs, ss)))
    result = result and (not canWin(y, x, not t, fs, True))
  elif t == True and fs == False: #if Anton turn and if Anton hasnt swapped then can swap 1 time
    for v in vectors:
      result = result and (not (canWin(x + v[0], y + v[1], not t, fs, ss)))
    result = result and (not canWin(y, x, not t, True, ss))
  else: #since both has swapped 1 time now cannot swap further
    for v in vectors:
      result = result and (not (canWin(x + v[0], y + v[1], not t, fs, ss)))

  mp[(x, y, t)] = result

  return result

result = False

for v in vectors:
  result = result or canWin(x + v[0], y + v[1], False, False, False)

if result == True:
  print "Anton"
else:
  print "Dasha"

#print canWin(1, 1, False, False, False) or (canWin(1, 2, False, False, False))
#Expected result was True since Anton wins but the result is False

import sys
from array import array  # noqa: F401

def input():
    return sys.stdin.buffer.readline().decode('utf-8')

x, y, n, d = map(int, input().split())
vector = [list(map(int, input().split())) for _ in range(n)]
dp = [-1] * (1 << n)

def solve(bit, x, y):
    if dp[bit] != -1:
        return dp[bit]

    for i in range(n):
        if (1 << i) & bit:
            continue
        if (x + vector[i][0]) ** 2 + (y + vector[i][1])**2 <= d**2 and solve(bit | (1 << i), x + vector[i][0], y + vector[i][1]) == 0:
            dp[bit] = 1
            return 1

    dp[bit] = 0
    return 0

if solve(0, x, y):
    print('Anton')
else:
    print('Dasha')