peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
from math import factorial

def dist(x1, y1, x2, y2):
    return ((x1 - x2)**2 + (y1 - y2)**2)**0.5

N = int(input())
x, y = [0]*N, [0]*N
for i in range(N):
    x[i], y[i] = map(int, input().split())

ans = 0

for i in range(N):
    for j in range(N):
        ans += dist(x[i], y[i], x[j], y[j]) * 2

ans /= factorial(N)

print(ans)
# Judge status: Wrong Answer
h , n = map(int, input().split())
a = list(map(int, input().split()))

for i in range(n):
  h = h - a[i]
if (h < 0):
  print("Yes")
else:
  print("No")
# Judge status: Accepted
import sys

N, K, Q = [int(i) for i in input().split()]
t = { k + 1: K for k in range(N) }
for _ in range(Q):
    A = int(input())
    t[A] += 1
for n in range(N):
    if t[n + 1] - Q > 0:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
N,K,S=map(int,input().split())
answers=[str(S)]*K
answers_=[str(S+1)]*(N-K)
a=' '.join(answers)
b=' '.join(answers_)
if K==0:
    if S==pow(10,9):
        answers_ = ['1'] * (N - K)
        b = ' '.join(answers_)
        c=b
    else:
        c=b
elif S==pow(10,9):
    answers_=['1']*(N-K)
    b = ' '.join(answers_)
    c=a+' '+b
else:
    c = a + ' ' + b
print(c)
# Judge status: Accepted
N = int(input())
S = [input() for i in range(N)]
M = int(input())
T = [input() for _ in range(M)]
S1 = set(S)
result = []

for a in S1:
    if a not in T:
        result.append(S.count(a))
    else:
        if S.count(a) >= T.count(a):
            result.append(S.count(a) - T.count(a))

if not result:
    print(0)
else:
    print(max(result))
# Judge status: Accepted
S = input()
T = input()

len_S = len(S)
len_T = len(T)

ans = len_T
for i in range(0, len_S - len_T + 1):
    match = 0
    for s, t in zip(S[i:i + len_T], T):
        if s == t:
            match += 1
    change = len_T - match
    ans = min(ans, change)

print(ans)
# Judge status: Accepted
n,m,k=map(int,input().split())
ans="No"
for i in range(n+1):
  if (2*i-n)==0:
    if k==m*n//2:
      ans="Yes"
  else:
    if (k-n*m+m*i)%(2*i-n)==0 and 0<=(k-n*m+m*i)//(2*i-n)<=m:
      ans="Yes"
print(ans)
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
import math

i = list(input().split())
print(math.floor(int(i[0])*float(i[1])))
# Judge status: Accepted
A, B, C = map(int, input().split())
fsf = [A, B, C]
if (fsf.count(5) == 2) & (fsf.count(7) == 1):
    print("YES")
else:
    print("NO")
# Judge status: Accepted
from collections import defaultdict
import sys
MOD=998244353
N=int(input())
dlist=list(map(int,input().split()))

if dlist[0]!=0:
  print(0)
  sys.exit(0)
  
ddic=defaultdict(int)
for d in dlist:
  ddic[d]+=1
  
if ddic[0]!=1:
  print(0)
  sys.exit(0)
  
max_d=max(dlist)
answer=1
for d in range(1,max_d+1):
  if ddic[d]==0:
    print(0)
    sys.exit(0)
    
  term=pow(ddic[d-1],ddic[d],MOD)
  answer*=term
  answer%=MOD
  
print(answer)
# Judge status: Accepted
N=int(input())
S=input()
ans=""
for i in range(len(S)):
    index=ord(S[i])+N
    if index>=91:
        index=index-26
    ans=ans+chr(index)
print(ans)
# Judge status: Accepted
x = int(input())

idx = 0
tmp = 0
while 1:
    tmp += x
    idx += 1
    if tmp % 360 == 0:
        break

print(idx)
# Judge status: Accepted
S = input()
T = input()

max_count = 0
for i in range(max(1, len(S) - len(T))):
    count = 0
    for j in range(len(T)):
        if S[i+j] == T[j]:
            count += 1
    max_count = max(max_count, count)
    
print(len(T) - max_count)
# Judge status: Wrong Answer
N = int(input())
a = list(map(int, input().split()))
mincost = 1000000000000000
for i in range(-100, 100):
    cost = 0
    for j in a:
        cost += (j - i) * (j - i)
    if cost < mincost:
        mincost = cost
print(mincost)
# Judge status: Accepted
N = int(input())
S = str(input())
W=[0] * N
E=[0] * N

for i in range(1, N):
    if S[i-1] == "W":
        W[i]=W[i-1]+1
    else:
        W[i]=W[i-1]
for i in range(N-2, -1, -1):
    if S[i+1] == "E":
        E[i]=E[i+1]+1
    else:
        E[i]=E[i+1]

tmp=W[0]+E[0]
for i in range(1, N):
    if tmp > W[i]+E[i]:
        tmp = W[i]+E[i]

print(tmp)
# Judge status: Accepted
a, b, c = map(int, input().split())
ans = 0

for i in range(10000):
    if a%2 == 0 and b%2 == 0 and c%2 == 0:
        A = (b + c)/2
        B = (a + c)/2
        C = (a + b)/2
        a = A
        b = B
        c = C
        ans += 1
    else:
        break

if ans >= 10000:
    print(-1)
else:
    print(ans)
# Judge status: Wrong Answer
s = input()
head = int(s[:2])
tail = int(s[2:])
if head > 12 and 0 < tail <= 12:
    print("YYMM")
elif 0 < head <= 12 and tail > 12:
    print("MMYY")
elif head <= 12 and tail <= 12:
    print("AMBIGUOUS")
else:
    print("NA")
# Judge status: Accepted
n, m = map(int, input().split())
dp = [[0] * (m+1) for i in range(n+1)]

for i in range(n):
    w, v = map(int, input().split())
    for j in range(m+1):
        if j < w:
            dp[i+1][j] = dp[i][j]
        else:
            dp[i+1][j] = max(dp[i][j-w]+v, dp[i][j])

print(dp[n][m])
# Judge status: Accepted
s = input()
ans = []
for a in s:
	if a == 'B':
		if len(ans) != 0:
			ans.pop()
	else:
		ans.append(a)
print(*ans,sep='')
# Judge status: Accepted
import sys
input = sys.stdin.readline

def main():
    n = int(input())
    p = [list(map(int, input().split())) for i in range(n)]

    p0, p1 = [0]*n, [0]*n

    for i in range(n):
        p0[i] = p[i][0] - p[i][1]
        p1[i] = p[i][0] + p[i][1]
    
    ans = max(max(p0)-min(p0), max(p1)-min(p1))
    print(ans)



    
if __name__ == "__main__":
    main()
# Judge status: Accepted
n = int(input())
div,mod = divmod(n,11)
if mod == 0:
    print(div*2)
elif mod <= 6:
    print(div * 2 +1)
else:
    print(div*2+2)
# Judge status: Accepted
L, R = map(int, input().split())
min_rad = 2019
R_max = min(L+2019, R)
for i in range(L, R_max):
    for j in range(i+1, R_max+1):
        temp = i%2019 * j%2019
        if temp < min_rad:
            min_rad = temp
print(min_rad)
# Judge status: Accepted
from sys import stdin
import itertools

def main():

    input = stdin.readline

    N = int(input())
    L = map(int,input().split())

    ans = 0

    for i in list(itertools.combinations(sorted(L), 3)):
        if (i[0] + i[1] > i[2]) & (i[0] != i[1]) & (i[1] != i[2]) & (i[0] != i[2]):
            ans += 1

    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Accepted
x,y,z=map(int,input().split())
print(str(z)+' '+str(x)+' '+str(y))
# Judge status: Wrong Answer
n=int(input())
a=sorted(map(int,input().split()))
alice=0
bob=0

for i in range(n):
    if i%2==1:
        alice+=a[i]
    else:
        bob+=a[i]

print(alice-bob)
# Judge status: Wrong Answer
# -*- coding : utf- 8 -*-

w = str(input())

for i in range(len(w)):
  if w.count(w[i]) % 2 == 1:
    print("NO")
    exit()
    
print("Yes")
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
t = 0
t += b[a[0]-1]
for i in range(1,n):
    t += b[a[i]-1]
    if a[i] - a[i-1] == 1:
        t += c[a[i-1]-1]
print(t)
# Judge status: Accepted
def main():

    A, B, C = map(int, input().split())
    if len(set([A, B, C])) == 2:
        return "Yes"
    return "No"

if __name__ == '__main__':
    print(main())
# Judge status: Accepted
n = int(input())
li = [1,2,3,4,5,6,7,8,9]
for i in range(9):
    for j in range(9):
        if li[i] * li [j] == n:
            print("Yes")
            exit()
        else:
            pass
print("No")
# Judge status: Wrong Answer
from sys import stdin
input = stdin.readline

N = int(input())
ab = [list(map(int, input().split())) for _ in range(N)]

ab.sort()

ran = []

for a, b in ab:
    ran.append(b - a + 1)

ran.sort()

if N % 2 == 0:
    a1, b1 = ab[N // 2 - 1]
    a2, b2 = ab[N // 2]
    xa = (a2 + a1) / 2
    xb = (b2 + b1) / 2
    print(int((xb - xa) * 2 + 1))
else:
    xa, xb = ab[N // 2]
    print("hoge")
    print(xb - xa + 1)
# Judge status: Accepted
n=int(input())
s={input() for i in range(n)}
print(len(s))
# Judge status: Accepted
N = int(input())
A,B = map(int,input().split())

for i in range(A,B+1):
  if i%N == 0:
    print('OK')
    exit()
    
print('NG')
# Judge status: Accepted
import bisect
from itertools import combinations

def main():
    N = int(input())
    L = sorted(list(map(int, input().split())))
    ans = 0
    for l in combinations(L, 2):
        a = l[0]
        b = l[1]
        x = bisect.bisect_left(L, a + b)
        y = bisect.bisect(L, b - a)
        if b - a < a :
            ans += x - y - 2
        else:
            ans += x - y - 1
    print(ans // 3)


if __name__ == "__main__":
    main()
# Judge status: Accepted
a, b, c, d = list(map(int, input().split()))

if abs(a - c) <= d:
    print("Yes")
elif abs(a - b) <= d and abs(b - c) <= d:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
A,B,C,D = map(int,input().split())
ans = ""
ans += (C-A) * "R" + (D-B) * "U"
ans += (C-A) * "L" + (D-B) * "D"
ans += "L" + (D-B+1) * "U" + (C-A+1) * "R"+ "D"
ans += "R" + (D-B+1) * "D" + (C-A+1) * "L"+ "U"
print(ans)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
b=list()
cnt=0
for i in a:
    if cnt==0:
        b.append(i)
        cnt=1
    else:
        b.insert(0,i)
        cnt=0
L=[str(a) for a in b]
L=" ".join(L)
print(L)
# Judge status: Accepted
N,M=map(int,input().split())

P=[]
A=round(M**0.5)+2
for i in range(1,A):
    if M%i==0:
        P.append(i)
        P.append(M//i)
P.sort()

B=M//N
ans=now=1
for p in P:
    now=p
    if now<=B:
        ans=now
print(ans)
# Judge status: Wrong Answer
l=list(map(int,input().split()))
l.sort()

s=10*l[0]+l[1]
print(s+l[2])
# Judge status: Wrong Answer
def main():
    S = input()
    flag = True
    if S[0] == 'A':
        cnt = 0
        pos = -1
        for i in range(2, len(S)-1):
            if S[i] == 'C':
                cnt += 1
                pos = i
            elif S[i].isupper():
                flag = False
        if flag and cnt == 1:
            print("AC")
            return
    print("WA")
    
main()
# Judge status: Wrong Answer
a=input()
for i in range(len(a)):
  if a[i]=="A":
    b=i
    break
for i in range(len(a)):
  if a[len(a)-i-1]:
    c=i
    break
print(c-b)
# Judge status: Wrong Answer
n, T = map(int, input().split())
ans = 1001
for _ in range(n):
    c, t = map(int, input().split())
    if t <= T:
        ans = min(c, ans)
print(ans)
# Judge status: Accepted
l=input().split()
print("A"+l[1][0]+"C")
# Judge status: Accepted
n = int(input())
ans = [0 for i in range(n + 1)]
for x in range(1,int(pow(n, 0.5)+1)):
    for y in range(1,int(pow(n, 0.5)+1)):
        for z in range(1,int(pow(n, 0.5)+1)):
            if x**2 + y**2+z**2 +x*y + x*z + y*z <= n:
                ans [x**2 + y**2+z**2 +x*y + x*z + y*z] += 1
for i in range(1,n+1):
    print(ans[i])
# Judge status: Accepted
int_str = input()
triple_same_digit = ['000']

first_three_digits = int_str[0:3]
last_three_digits = int_str[-3:]

for i in range(111, 1000, 111):
    triple_same_digit.append(str(i))

if first_three_digits in triple_same_digit:
    print('Yes')
elif last_three_digits in triple_same_digit:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    o=list(input())
    e=list(input())
    ans=''
    for x,y in zip(o,e):
        ans+=x+y
    if len(o)-len(e)==1:
        ans+=o[-1]
    print(ans)
resolve()
# Judge status: Accepted
n = int(input())

ans = 0
if n % 2 == 1:
    ans = 0
else:
    k = n // 2
    f = 5
    while k // f > 0:
        ans += (k // f)
        f *= 5
print(ans)
# Judge status: Accepted
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = input()
words = ('dream', 'dreamer', 'erase', 'eraser')

while True:
    if S == '':
        print("YES")
        break

    for word in words:
        if S.endswith(word):
            S = S[:-len(word)]
            break
    else:
        print("NO")
        break
# Judge status: Accepted
# あるアルファベットがN個あったとき、
# N個から一つ選ぶ or 選ばないのN + 1通り。これを全て掛け合わせ、1(一つも選ばない)を引く

import sys
readline = sys.stdin.readline

N = int(readline())
S = readline().rstrip()

from collections import defaultdict
dic = defaultdict(int)

for c in S:
  dic[c] += 1

ans = 1
DIV = 10 ** 9 + 7
for val in dic.values():
  ans *= ((val + 1) % DIV) 
  ans %= DIV
print(ans - 1)
# Judge status: Wrong Answer
from collections import defaultdict
from collections import deque
import itertools
import copy

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

s = list(input())

d = deque(["k","e","y","e","n","c","e"])

for i in s:
	if not d:
		break
	t = d.popleft()
	if t==i:
		continue
	else:
		d.appendleft(t)

if d:
	print("NO")
else:
	print("YES")
# Judge status: Accepted
import math
import itertools

N = int(input())
c = []
for _ in range(N):
    x, y = map(int, input().split())
    c.append((x, y))

P = itertools.permutations(range(N))
ans = []
for p in P:
    s = 0
    for i in range(len(p) - 1):
        s += math.sqrt(
            math.pow(c[p[i]][0] - c[p[i + 1]][0], 2)
            + math.pow(c[p[i]][1] - c[p[i + 1]][1], 2)
        )
    ans.append(s)

print(sum(ans) / len(ans))
# Judge status: Accepted
x = input().split()
flg = 0
if x[0] == x[1]:
  flg = 1
if flg == 1:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
y, m, d = input().split('/')

ans = '2018/'+m+'/'+d

print(ans)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if (a==b and b==c and a==c):
  print(4)
elif(a==b and b!=c):
  print(2)
elif(b==c and c!=a):
  print(2)
elif(c==a and a!=b):
  print(2)
else:
  print(1)
# Judge status: Accepted
x = int(input())
if x == 0:
    print(1)
if x == 1:
    print(0)
# Judge status: Accepted
# -*- coding: utf-8 -*-
import math
INF = 2**62-1

def read_int():
    return int(input())


def slv(K):
    ans = 0
    for i in range(1, K+1):
        for j in range(1, K+1):
            for k in range(1, K+1):
                ans += math.gcd(math.gcd(i, j), k)
    return ans


def main():
    K = read_int()
    print(slv(K))


if __name__ == '__main__':
    main()
# Judge status: Accepted
#abc056 b 
w,a,b=map(int,input().split())
if a>b:
    tmp=a 
    a=b 
    b=tmp 
if b<a+w:
    print(0)
else:
    print(b-a-w)
# Judge status: Accepted
n = int(input())
p = list(map(int,input().split()))

count = 1
num = p[0]
for i in range(1,len(p)):
    if p[i] <= num:
        count += 1
        num = p[i]
        
print(count)
# Judge status: Accepted
from collections import defaultdict

N, M = map(int, input().split())
P, Y = [], []
ylist = defaultdict(list)
pset = set()
for i in range(M):
    p, y = map(int, input().split())
    P.append(p)
    Y.append(y)
    ylist[p].append(y)
    pset.add(p)

cdict = defaultdict(dict)
for p in pset:
    syear = sorted(ylist[p])
    for i, y in enumerate(syear):
        cdict[p][y] = i + 1

for i in range(M):
    p = P[i]
    y = Y[i]
    rank = cdict[p][y]
    print('{:06}{:06}'.format(p, rank))
# Judge status: Wrong Answer

X = int(input())

flg = 1
ans = 0
print(10**5)
for i in range(X, 10**100):
    flg = 1
    for j in range(2, i):
        if i % j == 0:
            flg = 0
            break
    if flg == 1:
        ans = i
        break

print(ans)
# Judge status: Accepted
x,y,z = map(int,input().split())
if x == y and y==z:
  print(1)
elif x == y or y == z or z ==x :
  print(2)
else:
  print(3)
# Judge status: Wrong Answer
# -*- coding : utf-8 -*- 

w,h,n = map(int, input().split())


l,r,u,d = 0,w,h,0
for i in range(n) :
  x,y,a = map(int, input().split())
  if a == 1:
    l = min(l,x)
  elif a == 2:
    r = max(r,x)
  elif a == 3:
    d = min(d,y)
  elif a == 4:
    u = max(u,y)
  
S = max(0, u-d) * max(0,l-d)
print(int(S))
# Judge status: Accepted
def actual(N):
    if N % 1000 == 0:
        return 0

    return (N // 1000 + 1) * 1000 - N

N = int(input())
print(actual(N))
# Judge status: Accepted
N = int(input())
ABC = list()
for _ in range(N):
    ABC.append(list(map(int, input().split(" "))))

dp = [ABC[0][0], ABC[0][1], ABC[0][2]]

for day in range(1, N):
    new_dp = [max(dp[1], dp[2])+ABC[day][0],
              max(dp[0], dp[2])+ABC[day][1],
              max(dp[0], dp[1])+ABC[day][2]]
    dp = new_dp
    
print(max(dp))
# Judge status: Accepted
n = 100
ans = 0
X = int(input())

while n < X:
    n = n + int(n*0.01)
    ans += 1
    
print(ans)
# Judge status: Wrong Answer
N,K = map(int,input().split())
candle = list(map(int,input().split()))

min_value = 10**6

for i in range(N-K+1):
    left = abs(candle[i])+abs(candle[i]-candle[i+K-1])
    right = abs(candle[i+K-1])+abs(candle[i]-candle[i+K-1])
    if min_value > min(left,right):
        min_value = min(left,right)
        
        
print(min_value)
# Judge status: Wrong Answer
n,k=map(int,input().split())
a=list(map(int,input().split()))
b=[0]*n
cnt=0
while a[0]!=n and cnt<k:
  cnt+=1
  for i in range(n):
    b[max(0,i-a[i]):min(n,i+a[i]+1)]=map(lambda x:x+1,b[max(0,i-a[i]):min(n,i+a[i]+1)])
  a=b
  b=[0]*n
print(*a)
# Judge status: Accepted
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
point=[k-q]*n
for i in a:
    point[i-1]+=1
for i in point:
    if i>0:
        print("Yes")
    else:
        print("No")
# Judge status: Wrong Answer
s = input()
if s[-1] == "e":
    print(s + "s")
else:
    print(s + "es")
# Judge status: Wrong Answer
x,y,z = map(int,input().split())
people = 0
x = x-2*z
while x-y >0:
  x = x-y
  people += 1
  x -= z 
print(people)
# Judge status: Accepted
N = input()
if '7' in N:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
A,B = input().split()
A = int(A)
B = "".join(list(B.split(".")))
B = int(B)
print((A*B)//100)
# Judge status: Accepted
i= int(input())
l=list(map(int, input().split()))
time=[]
for i in range(i):
  time.append([])
for i in l:
  
  time[i-1].append(i)
  
for i in time:

  print(len(i))
# Judge status: Accepted
#085_C
n,y=map(int,input().split())
for a in range(0,n+1):
    mon=y-10000*a
    cnt=n-a
    
    if (mon-1000*cnt)%4000==0 and (5000*cnt-mon)%4000==0:
        b=(mon-1000*cnt)//4000
        c=(5000*cnt-mon)//4000
        
        if 0<=b<=n and 0<=c<=n:
            print(a,b,c)
            exit()

print(-1,-1,-1)
# Judge status: Accepted
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-07-26 12:46:01 +0900
# LastModified: 2020-07-26 13:19:34 +0900
#


import os
import sys


def main():
    n, m, k = map(int, input().split())
    for s in range(m+1):
        for t in range(n+1):
            if k == n*s+m*t-2*s*t:
                print("Yes")
                return
    print("No")


if __name__ == "__main__":
    main()
# Judge status: Accepted
n = int(input())
a = [0] * n
b = [0] * n
for i in range(n):
    a[i],b[i] = map(int,input().split())
a.sort()
b.sort()
if n % 2 == 1:
    print(b[n//2] - a[n//2] + 1)
else:
    front = n//2
    back = (n-1)//2
    print((b[front] + b[back] - (a[front] + a[back]) + 1))
# Judge status: Wrong Answer
valmax = int(input()) 

cnt = 0
for i in range(1,valmax):
  tmp = int(10*valmax/i)
  tmp = tmp - tmp%10 
  cnt += int(tmp/10) -1
  
print(cnt)
# Judge status: Accepted
n = int(input())
a_list = [0] + list(map(int, input().split()))
b_list = [0] + list(map(int, input().split()))
c_list = [0] + list(map(int, input().split()))

sum = 0

for i in range(1, n+1):
    sum += b_list[a_list[i]]
    if i >= 2:
        if a_list[i] == a_list[i-1] + 1:
            sum += c_list[a_list[i-1]]
    #print(sum)


print(sum)
# Judge status: Wrong Answer
x,k,d = map(int,input().split())

r = x % d
m = x // d
if m > k:
    print(x - k * d)
elif (-m) > k:
    print(x + k * d)
elif (k - m) % 2 == 0:
    print(r)
else:
    print(d - r)
# Judge status: Wrong Answer
n, k = map(int, input().split())
p_bef = list(map(int, input().split()))
p_aft = sorted(p_bef, reverse = True)
ans = 0
for i in range(k):
   ans += (1 + p_aft[i]) / 2
print(ans)
# Judge status: Accepted
s=input()
t=input()
if len(t)-len(s)==1 and s==t[:len(s)]:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n,m = map(int, input().split())
f = [1] 
p = 10**9 + 7
for i in range(1, max(n,m) + 1):
  f.append(f[-1] * i % p)

if abs(n-m) == 1:
  print(f[n] * f[m] % p)
elif abs(n-m) == 0:
  print(f[n] * f[m] * 2 % p)
else:
  print(0)
# Judge status: Wrong Answer
k,x=map(int,input().split())
for i in range(k*2-1):
  if(i==k*2-2):
    print((k-x)+i)
  else:
    print((k-x)+i,end=(" "))
# Judge status: Accepted
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))

x, a, b = na()
if a >= b:
    print("delicious")
elif (a+x) >= b:
    print("safe")
else:
    print("dangerous")
# Judge status: Wrong Answer
L,R=map(int,input().split())

min_val = 2019
flag = 1
for i in range(L,R):
  tmp = (i*(i+1)) % 2019
  if tmp == 0:
    flag = 0
    break
  elif tmp < min_val:
    min_val = tmp
if flag == 0:
  print(0)
else:
  print(min_val)
# Judge status: Accepted
S, T = input().split()
A, B = map(int, input().split())
U = input()

if U == S:
    A -= 1
else:
    B -= 1

print('{} {}'.format(A, B))
# Judge status: Wrong Answer
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if a[0] %2 ==1:
        print(a[0]*(a[0]-1))
    else:
        print(a[0]*(a[0]))
# Judge status: Accepted
a,b,c,d=map(int, input().split())

if d<a:
  print(d)
elif d<b:
  print(a)
else:
  print(2*a-d+b)
# Judge status: Wrong Answer
from math import log
X, Y = map(int,input().split())
print(int(log(Y, 2) - log(X, 2)) + 1)
# Judge status: Wrong Answer
n, m, a, b = map(int, input().split())
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
x.sort()
y.sort()

if max(x) < min(y):
  print("No War")
  exit()

print("War")
# Judge status: Accepted
n,m = map(int,input().split())

if 2*n >=m:
  print(int(m/2))
else:
  print(n + int((m-2*n)/4))
# Judge status: Accepted
s,w=map(int,input().split())
if s>w:
    print('safe')
else:
    print('unsafe')
# Judge status: Wrong Answer
n = int(input())
w = list(map(int, input().split()))
a = sum(w) // 2
c = 0
for i in w:
    c += i
    if c >= a:
        break
print(abs(sum(w) - c - c))
# Judge status: Accepted
n, a, b = map(int, input().split())
S = input()
cnt = 0
no = 0
for i in range(n):
    if S[i] == 'a':
        if cnt < a+b:
            print('Yes')
            cnt += 1
        else:
            print('No')
    if S[i] == 'b':
        no += 1
        if cnt < a+b and no <= b:
            print('Yes')
            cnt += 1
        else:
            print('No')
    if S[i] == 'c':
        print('No')
# Judge status: Accepted
n,m=map(int,input().split())
for i in range(m):print(i+1,n-i-((i>=m/2)&~n))
# Judge status: Accepted
from collections import Counter
N=int(input())
a=list(map(int,input().split()))
for i in range(N):
  a.append(a[i]+1)
  a.append(a[i]-1)
c=Counter(a).most_common()
print(c[0][1])
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))

ans = 0
for i in range(n):
    if ((i % 2) == 0):
        continue
    if ((a[i] % 2) != 0):
        ans += 1

print(ans)
# Judge status: Accepted
a,b=map(int,input().split())
if a==b:
    print('Draw')
elif a==1:
    print('Alice')
elif b==1:
    print('Bob')
elif a<b:
    print('Bob')
else:
    print('Alice')
# Judge status: Wrong Answer
def main():
    a, b = map(int, input().split())
    import math

    print(math.gcd(a,b))
    


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
N = int(input())
A = []
import math
for i in range(2, 53):
    if N % i == 0:
        A.append(i)

if len(A) == 0:
    print(N-1)
    exit()
C = range(2,N)
B = 10 **13
for a in range(int(math.sqrt(N)) + 1, 1, -1):
    if N % a == 0:
        print(a + (N // a) - 2)
        break
# Judge status: Accepted
a, b = map(int, input().split())


if a > b:
    ans = a + max(a-1, b)
else:
    ans = b + max(a, b-1)
print(ans)
# Judge status: Wrong Answer
s,c=map(int,input().split())
if s > c*2:
   print(c//2)
else:
   c-=s*2
s+=c//4
print(s)