Harryxun/stf_run huggingface dataset:
N,A,B=map(int,input().split())
rest = N-A-B
if A ==0:
    print(0)
elif N>A+B:
    answer = A + rest
    print(answer)
elif A<=N<=A+B:
    print(A)
elif A>=N:
    print(N)

### FIXED CODE ###

S =list(input())
if S[0] =="B" and S[1]=="B" and S[2]=="B":
    print("No")
elif S[0] =="A" and S[1]=="A" and S[2]=="A":
    print("No")
else:
    print("Yes")
R = int,input()
print(float(R * 3.14 * 2))


### FIXED CODE ###

import math
R = int(input())
print(2*math.pi*R)
from itertools import accumulate
n = int(input())
A1 = list(map(int,input().split()))
A2 = list(map(int,input().split()))
a1 = list(accumulate(A1))
ans = 0
for i in range(n):
  sums = a1[i]
  A3 = A2[i:]
  a2 = list(accumulate(A3))
  sums += max(a2)
  ans = max(ans,sums)
print(ans)

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
print((a-b) % c)
# -*- coding: utf-8 -*-

from statistics import stdev

while True:
    n = int(input())

    if n == 0:
        break

    s = list(map(int, input().split()))
    print(stdev(s))



### FIXED CODE ###

# -*- coding: utf-8 -*-

import math

while True:
    n = int(input())

    if n == 0:
        break

    s = list(map(float, input().split()))
    mean = sum(s) / len(s)

    for i in range(len(s)):
        s[i] = (s[i] - mean) * (s[i] - mean)

    variance = sum(s) / len(s)
    stdev = math.sqrt(variance)

    print(stdev)
a,b,c=map(int,input().spilt())
if(a+b>=c):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a,b,c = map(int,input().split())
if a+b>=c:
  print("Yes")
else:
  print("No")
X, Y, A, B, C = map(int, input().split())
p = list(map(int, input().split()))
q= list(map(int, input().split()))
r= list(map(int, input().split()))
p.sort(reverse = True)
q.sort(reverse = True)
r.sort(reverse = True)
ls = []
for i in range(X):
    ls.append(p[i])
for i in range(Y):
    ls.append(q[i])
while(r != []):
    for i in range(len(r)):
        minimum = min(ls)
        if r[i] > minimum:
            ls[ls.index(minimum)] = r[i]
        r.pop(0)
print(sum(ls))

### FIXED CODE ###

X, Y, A, B, C = map(int, input().split())
p = list(map(int, input().split()))
q= list(map(int, input().split()))
r= list(map(int, input().split()))
p.sort(reverse = True)
q.sort(reverse = True)
r.sort(reverse = True)
ls = []
for i in range(X):
    ls.append(p[i])
for i in range(Y):
    ls.append(q[i])
ls.extend(r)
ls.sort(reverse = True)
print(sum(ls[:X+Y]))
S = input()
n = 0
def judge(s):
  i = 0
  N = len(s)
  while i < (N-1) / 2
    if S[i] != S[N-1]:
      break
    elif i == (N-1)/2:
      n += 1
      break
    else:
      i += 1
judge(S)
judge(S[0 : (len(S)-3)/2])
judge(S[(len(S)+1)/2] : len(S)-1)

if n == 3:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

import sys
s = sys.stdin.readline().rstrip()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:-(-(l-1)//2)]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)//2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')
from sys import stdin
n = int(stdin.readline().rstrip())
li = list(int(stdin.readline().rstrip()) for _ in range(n))
li_to = sorted(li)
one = li_to[-1]
two = li_to[-2]
for i in range(n):
    if max(li) == li[i]:
        print(two)
    else:
        print(one)

### FIXED CODE ###

from sys import stdin

n = int(stdin.readline().rstrip())
print(3*n**2)
import sys

n = input()

if n[0] == '9':
	m = ''.join(['9']*len(n))
	if int(n) > int(m):
		print(''.join(['1']*(len(n)+1)))
		sys.exit()
	else:
		print(m)
		sys.exit()
else:
	s = n[0]
	m = ''.join([s]*len(n))
	if int(n) > int(m):
		print(''.join([s+1]*len(n)))
		sys.exit()
	else:
		print(m)
		sys.exit()




### FIXED CODE ###

import sys

n = input()

if n[0] == '9':
	m = ''.join(['9']*len(n))
	if int(n) > int(m):
		print(''.join(['1']*(len(n)+1)))
		sys.exit()
	else:
		print(m)
		sys.exit()
else:
	s = n[0]
	m = ''.join([s]*len(n))
	if int(n) > int(m):
		print(''.join([str(int(s)+1)]*len(n)))
		sys.exit()
	else:
		print(m)
		sys.exit()
a,s,b=map(input(),split())
print(a(0)+c(0)+b(0))


### FIXED CODE ###

a,b,c=input().split()
print(a[0]+b[0]+c[0])
#!/usr/bin/env python3

def main():
    import sys
    def I(): return int(sys.stdin.readline())
    def LI(): return list(map(int,sys.stdin.readline().split()))

    n = I()
    V = []
    W = []
    m = min(n, 1 << 10)
    maxL = 10**5
    dp = [[0]*(maxL + 1) for _ in range(m + 1)]
    
    for i in range(1, m+1):
        v, w = LI()
        if i > n:
            V.append(v)
            W.append(w)
            continue
        for j in range(maxL+1):
            if j < w:
                dp[i][j] = dp[i>>1][j]
            else:
                dp[i][j] = max(dp[i>>1][j], dp[i>>1][j - w] + v)
        V.append(v)
        W.append(w)
    
    q = I()
    for i in range(q):
        v, L = LI()
        if v <= m:
            print(dp[v][L])
            continue
        cnt = 0
        tmp = v
        v_ = []
        w_ = []
        while tmp > m:
            v_.append(V[tmp-1])
            w_.append(W[tmp-1])
            tmp >>= 1
            cnt += 1
        ret = dp[tmp-1][L]
        v_tmp = [0] * (1 << cnt)
        w_tmp = [0] * (1 << cnt)
        for b in range(1, 1 << cnt):
            lsb = b & -b
            l = lsb.bit_length()
            w_tmp[b] = w_tmp[b - lsb] + w_[l-1]
            if w_tmp[b] <= L:
                v_tmp[b] = v_tmp[b - lsb] + v_[l-1]
                ret = max(ret, v_tmp[b] + dp[tmp-1][L - w_tmp[b]])
        print(ret)
    return

if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3

def main():
    import sys
    def I(): return int(sys.stdin.readline())
    def LI(): return list(map(int,sys.stdin.readline().split()))

    n = I()
    V = []
    W = []

    maxL = 10**5
    m = min(n, 1 << 10)
    dp = [[0]*(maxL + 1)]
    
    for i in range(n):
        v, w = LI()
        if i <= m:
            d_ = dp[(i+1)>>1][:]
            for j in range(w, maxL+1)[::-1]:
                d_[j] = max(d_[j], d_[j - w] + v)
            dp.append(d_)
        V.append(v)
        W.append(w)
    
    q = I()
    for i in range(q):
        v, L = LI()
        if v <= m:
            print(dp[v][L])
            continue
        cnt = 0
        v_ = []
        w_ = []
        while v > m:
            v_.append(V[v-1])
            w_.append(W[v-1])
            v >>= 1
            cnt += 1
        ret = dp[v][L]
        v_tmp = [0] * (1 << cnt)
        w_tmp = [0] * (1 << cnt)
        for b in range(1, 1 << cnt):
            lsb = b & -b
            l = lsb.bit_length()
            w_t = w_tmp[b - lsb] + w_[l-1]
            w_tmp[b] = w_t
            if w_t <= L:
                v_t = v_tmp[b - lsb] + v_[l-1]
                v_tmp[b] = v_t
                ret = max(ret, v_t + dp[v][L - w_t])
        print(ret)
    return

if __name__ == "__main__":
    main()
a_1, b_0, c_m1, k = map(int, input().split())

def dfs(n, a_n, b_n, c_n, max_):
	#print(n, a_n, b_n, c_n, max_)
	#print(type(n), type(a_n), type(b_n), type(c_n), type(max_))
	if (a_n > a_1 or b_n > b_0 or c_n > c_m1):
		return max_
	if (n == 0):
		max__ = int(a_n) - int(c_n) 
		if (max__ > max_):
	#		print(max__, type(max__), "***")
			return max__
		else:
			return max_
	m1 = dfs(n-1, a_n+1, b_n, c_n, max_)
	#print(m1, type(m1), "+++")
	m2 = dfs(n-1, a_n, b_n+1, c_n, m1)
	m3 = dfs(n-1, a_n, b_n, c_n+1, m2)
	return m3
            
max_ = dfs(k, 0, 0, 0, -99999)
print(max_)

### FIXED CODE ###

a, b, c, k = [int(x) for x in input().split()]
a_x = min(a, k)
k -= a_x
b_x = min(b, k)
k -= b_x
c_x = min(c, k)
ans = a_x - c_x
print(ans)
import sys
from collections import deque
	S=[input()]
	S=deque(S)
	Q=int(sys.stdin.readline())
	flag=0
	for i in range(Q):
		qu=tuple(input().split())
		if qu[0]=='1':
			if flag==0:
				flag+=1
			else:
				flag=0
		else:
			if qu[1]=='1' and flag==0:
				S.appendleft(qu[2])
			elif qu[1]=='1' and flag==1:
				S.append(qu[2])
			elif qu[1]=='2' and flag==0:
				S.append(qu[2])
			elif qu[1]=='2' and flag==1:
				S.appendleft(qu[2])
	if flag==1:
		S.reverse()
	print(''.join(S))

### FIXED CODE ###

import sys
from collections import deque
S=[input()]
S=deque(S)
Q=int(sys.stdin.readline())
flag=0
for i in range(Q):
	qu=tuple(input().split())
	if qu[0]=='1':
		if flag==0:
			flag+=1
		else:
			flag=0
	else:
		if qu[1]=='1' and flag==0:
			S.appendleft(qu[2])
		elif qu[1]=='1' and flag==1:
			S.append(qu[2])
		elif qu[1]=='2' and flag==0:
			S.append(qu[2])
		elif qu[1]=='2' and flag==1:
			S.appendleft(qu[2])
if flag==1:
	S=''.join(S)
	S=S[::-1]
	print(S)
	exit()
print(''.join(S))
m,*a = map(int,open(0).read().split())
am = []
ap = []
amap = am.append
apap = ap.append
for i in a:
  if i >= 0:
    apap(i)
  else:
    amap(i)
ans = []
ansap = ans.append
for _ in range(m-1):
  if len(ap) == 0:
    x = max(am)
    y = min(am)
    am.remove(x)
    am.remove(y)
    apap(x-y)
  elif len(am) == 0:
    x = min(ap)
    y = max(ap)
    ap.remove(x)
    ap.remove(y)
    amap(x-y)
  elif len(ap) > len(am):
    x = am.pop()
    y = ap.pop()
    amap(x-y)
  else:
    x = ap.pop()
    y = am.pop()
    apap(x-y)
  ansap(" ".join((str(x),str(y))))

print(ap[0])
print("\n".join(ans))

### FIXED CODE ###

n= int(input())
a = list(map(int,input().split()))
xy = []
xyap = xy.append
ap = max(a)
a.remove(ap)
am = min(a)
a.remove(am)
for i in a:
  if i>0:
    xyap((am,i))
    am -= i
  else:
    xyap((ap,i))
    ap -= i
xyap((ap,am))
print(ap-am)
for i in xy:
  print(*i)
import re
len(max(re.sub(r'[^ACGT]', ' ', input()).split()))


### FIXED CODE ###

row = input()
lenght = len(row)
max_moji = 0
for i in range(lenght):
    if row[i] in 'ACGT':
        moji = 1
        for j in range(i + 1, lenght):
            if row[j] in 'ACGT':
                moji += 1
            else:
                break
        max_moji = moji if moji > max_moji else max_moji
    if max_moji == lenght - i:
        break
print(max_moji)
a,b=map(int, input().split())
c=input()
if c[b-1]=="A":
    c[b-1]="a"
elif c[b-1]=="B":
    c[b-1]="b"
else:
    c[b-1]="c"
print(''.join(c))

### FIXED CODE ###

a,b=map(int, input().split())
c=list(input())
henka = c.pop(b-1)
if henka=="A":
    c.insert(b-1,"a")
elif henka=="B":
    c.insert(b-1,"b")
else:
    c.insert(b-1,"c")
print(''.join(c))
n = input()
maxv = -20000000
list = []

i = 0
while(i<n):
	x = input()
	list = list.append(x)
	i = i + 1

minv = list[0]
i = 1
while(i<n):
	maxv = max(maxv, list[i]-minv)
	minv = min(minv, list[i])
	i = i + 1

print(maxv)


### FIXED CODE ###

n = input()
n = int(n)
list = []

i = 0
while(i<n):
	x = input()
	x = int(x)
	list.append(x)
	i = i + 1

maxv = -2000000000
minv = list[0]
i = 1
while(i<n):
        maxv = max(maxv, list[i]-minv)
        minv = min(minv, list[i])
        i = i + 1
	
print(maxv)
import sys

VALUE = 500

num = int(sys.argv[1])
if num < 1 or num > 100:
    assert False, 'Invalid value'

threshold = int(sys.argv[2])
if threshold < 1 or threshold > 10**5:
    assert False, 'Invalid value'

result = 'Yes' if num * VALUE >= threshold else 'No'
print(result)


### FIXED CODE ###

#!/usr/bin/env python

VALUE = 500

stdin = input()
args = stdin.split(' ')

num = int(args[0])
if num < 1 or num > 100:
    assert False, 'Invalid value'

threshold = int(args[1])
if threshold < 1 or threshold > 10**5:
    assert False, 'Invalid value'

result = 'Yes' if num * VALUE >= threshold else 'No'
print(result)
s = input()
s2 = []
for i in range(len(s)):
    s2.append(s[i])
s2 = list(set(s2))
s2.sort()
s3 = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
if s2 == s3:
    print('None')
else:
    for i in range(int(len(s3))):
        if s2[i] != s3[i]:
            print(s3[i])
            break

### FIXED CODE ###

s = list(input())
s2 = []
for i in range(len(s)):
    s2.append(s[i])
s3 = list(set(s2))
s3.sort()
s4 = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
if s3 == s4:
    print('None')
else:
    for i in range(int(len(s3))):
        if s3[i] != s4[i]:
            print(s4[i])
            break
        if i == len(s3)-1:
            print(s4[i+1])
from fractions import gcd
from functools import reduce

def lcm_base(x, y):
    return (x * y) // gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def main():
    N, M = map(int, input().split())
    A = list(set(map(int, input().split())))
    common = lcm_list(A)
    cnt = M // common
    max_A = max(A)
    if (cnt + 0.5) * common <= M:
        cnt += 1
    if max_A == common:
        cnt -= 1
    print(cnt)

if __name__ == "__main__":
    main()

### FIXED CODE ###

from fractions import gcd
from functools import reduce

def lcm_base(x, y):
    return (x * y) // gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def cnt_div_2(x):
    cnt = 0
    while x > 0:
        if x % 2 == 0:
            x //= 2
            cnt += 1
        else:
            break
    return cnt

def main():
    N, M = map(int, input().split())
    A = list(set(map(int, input().split())))
    cnt_2 = cnt_div_2(A[0])
    for a in A:
        if cnt_div_2(a) != cnt_2:
            print(0)
            exit()


    common = lcm_list(A)
    max_A = max(A)
    cnt = M // common
    if ((2 * cnt + 1) * common) // 2 <= M:
        print(cnt + 1)
    else:
        print(cnt)
    
if __name__ == "__main__":
    main()
N,M = map(int, input().split())
a = [int(input()) for i in range(M)]

flag = 0
if m > 2:
    for i in range(M-1):
        if a[i+1] - a[i] == 1:
            flag += 1

if flag >= 1:
    print(0)


else:
    def fib(n):
        a, b = 0, 1
        for i in range(n):
            a, b = b, a + b
        return b

    ans = fib(a[0]-1)
    for i in range(M-1):
        ans = (ans * fib(a[i+1]-a[i]-2))%(10**9+7)

    ans = (ans * fib(N-a[-1]-1))%(10**9+7)

    print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000)

N,M = map(int, input().split())
a = [int(input()) for i in range(M)]

def fib(n):
        a, b = 0, 1
        for i in range(n):
            a, b = b, a + b
        return b if n >= 0 else 0

if M == 0:
    ans = fib(N) % (10**9+7)


elif M == 1:
    ans = fib(a[0]-1) * fib(N-a[0]-1)
    ans %= (10**9+7)

else:
    ans = fib(a[0]-1)
    for i in range(M-1):
        ans = (ans * fib(a[i+1]-a[i]-2))%(10**9+7)

    ans = (ans * fib(N-a[-1]-1))%(10**9+7)

print(ans)
S = input()
N = len(S)
i = 0
while i < N:
    sig = 0
    S5 = S[i:i+5]
    if S5 == 'dream':
        sig = 1
        if S[i+5:i+7] == 'er' and S[i+7] != 'a':
            i += 2
        i += 5
    elif S5 == 'erase':
        sig = 1
        if S[i+5:i+6] == 'r':
            i += 1
        i += 5
    if sig == 0:
        sig = 2
        Answer = 'No'
        break
if sig != 2:
    Answer = 'Yes'
print(Answer)

### FIXED CODE ###

S = input()
N = len(S)
i = 0
while i < N:
    sig = 0
    S5 = S[i:i+5]
    if S5 == 'dream':
        sig = 1
        if S[i+5:i+7] == 'er' and S[i+7:i+8] != 'a':
            i += 2
        i += 5
    elif S5 == 'erase':
        sig = 1
        if S[i+5:i+6] == 'r':
            i += 1
        i += 5
    if sig == 0:
        sig = 2
        Answer = 'NO'
        break
if sig != 2:
    Answer = 'YES'
print(Answer)
# coding: utf-8

s = input()
k = int(input())

not_one_index = 0
for i in range(k):
    if s[i] == '1':
        not_one_index = not_one_index + 1
    else:
        break

if k < not_one_index:
    print(1)
else:
    print(s[not_one_index])


### FIXED CODE ###

# coding: utf-8

s = input()
k = int(input())

not_one_index = 0
for i in range(len(s)):
    if s[i] == '1':
        not_one_index = not_one_index + 1
    else:
        break

if k <= not_one_index:
    print(1)
else:
    print(s[not_one_index])
n,m=(int(i) for i in input().split())
a=0
b=0
for i in range(m):
  l,r=(int(i) for i in input().split())
  if l>a,r<b:
    a=l
    b=r
  elif l>a and r>=b:
    a=l
  elif r<b and l<=a:
    b=r
if n>a and n<b:
  print(n-a)
elif n>a and n>=b:
  print(b-a)
else:
  print(0)

### FIXED CODE ###

n,m=(int(i) for i in input().split())
a=0
b=10**6
for i in range(m):
  l,r=(int(j) for j in input().split())
  if l>a and r<b:
    a=l
    b=r
  elif l>a and r>=b:
    a=l
  elif r<b and l<=a:
    b=r
if b>=a:
	if n>=a and n<b:
  		print(n-a+1)
	elif n>=a and n>=b:
  		print(b-a+1)
	elif n<a:
  		print(0)
else:
  	print(0)
#標準入力
N,Q = list(map(int,input().split()))
tree = []
for i in range(N-1):
  tmp = [int(i) for i in input().split()]
  tree.append(tmp)

x_list = []
for i in range(Q):
  tmp = [int(i) for i in input().split()]
  x_list.append(tmp)

#print(N)
#print(Q)
#print(tree)
#print(x_list)
#関数

#l:リスト　x:加算値
def saiki(result, chil_list, pos, l, x):
  #print(result)
  if not l:
    result[pos] += x
  else:
    result[pos] += x
    for j in l:
      #print(j)
      saiki(result, chil_list, j, chil_list[j], x)
    

#子リストの作成
children=[]
for i in range(N+1):
  children.append([])
for i in range(N-1):
  children[tree[i][0]].append(tree[i][1])

#print(children)
#結果リストの初期化
result = [0] * (N+1)

for i in range(Q):
  kasan_root = x_list[i][0]
  kasan = x_list[i][1]
  
  if not children[kasan_root]:
    result[kasan_root] += kasan
  else:
    saiki(result, children, kasan_root, children[kasan_root], kasan)
    #result[kasan_root] += kasan
  
result.pop(0)
print(*result)

### FIXED CODE ###

n,q = map(int,input().split())
rl = [0] * n
al = [0] * n
for i in range(n-1):
    a,b = map(int,input().split())
    rl[b-1] = a -1
for j in range(q):
    p,x = map(int,input().split())
    al[p-1] += x
for k in range(n):
    if k == 0:
        pass
    else:
        al[k] += al[rl[k]]
print(*al)
p, q, r = map(int, input().split())

print(sum[p, q, r] - max[p, q, r])


### FIXED CODE ###

p, q, r = map(int, input().split())
time = [p, q, r]

print(sum(time) - max(time))
print(input().swapcase()))



### FIXED CODE ###

print(input().swapcase())
N, K = map(int, input().split())
A = list(map(int, input().split()))
visited = [-1]*(N+1)
path = []
at = 1
count = 0
while True:
    if visited[at] != -1:
        loop = count-visited[at]
        if K < count: # (K-visited[at])//loopが1以上であることを保証
            print(path[K]+1) # 条件 K < visited[at]なら、(K-visited[at])//loopが0以上であることを保証。どっちでもよさそう。
        else:
            print(path[(K-visited[at])%loop+visited[at]]+1)
        break
    visited[at] = count
    count += 1
    path.append(at)
    at = A[at]

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))
visited = [False]*N
path = [0]
at = 0
loop = 0
visited[0]=True
for i in range(N):
    at = A[at]-1
    if visited[at]:
        loop = i+1-path.index(at)
        break
    else:
        visited[at]=True
        path.append(at)
if K < len(path):
    print(path[K]+1)
else:
    print(path[(K-path.index(at))%loop+path.index(at)]+1)
n = int(input())
s = input()
c = []
for i in range(1,n-1):
  r = []
  for t in s[:i+1]:
    if t in s[i+1:]:
      r += [t]
  c += [len(set(r))]
print(max(c))

### FIXED CODE ###

n = int(input())
s = input()
c = []
for i in range(1,n):
  r = []
  for t in s[:i]:
    if t in s[i:]:
      r += [t]
  c += [len(set(r))]
print(max(c))
# -*- coding: utf-8 -*-
l = [0] 
r = [0]
all_gate_clear = 0


#numcard
#gatenum
N, M = map(int, input().split())
card_count = range(N+1)

#idカードの生成
for i in range(1,M+1):
    l_temp,r_temp = map(int, input().split())
    l.append(l_temp)
    r.append(r_temp)
    
for gate_num in range(1,M+1):
    #1ゲートの処理
    for card in range(1,N+1):
        num = 0
        while r[gate_num] >= l[gate_num] + num:
            if l[gate_num] + num == card:
                if card_count[card] == gate_num -1:
                    card_count[card] += 1
                    break
            num += 1

for card in range(1,N+1):
    if card_count[card] == M:
        all_gate_clear += 1

print(all_gate_clear)

### FIXED CODE ###

# -*- coding: utf-8 -*-
l = [] 
r = []
count = 0

N, M = map(int, input().split())
l = [0] * M
r = [0] * M
for i in range(0,M):
    l[i], r[i] = map(int, input().split())

#idカードの生成
    
ml = max(l)
mr = min(r)

for i in range(1,N+1):
    if  ml <= i and i <= mr:
        count += 1

print(count)
n=int(input())
s=list(input())
for i in range(0,n-2):
    if s[i]=="A" and s[i+1]=="B" and s[i+2]=="B":
        total+=1
print(total)

### FIXED CODE ###

n=int(input())
s=list(input())
total=0

for i in range(0,n-2):
    if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
        total+=1
print(total)
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
A,B,C,D = map(int,input().split())
if A%C==0 or B%C==0:
    C_div = (B-A+1)//C + 1
else:
    C_div = (B-A+1)//C
if B%C==0 or B%D==0:
    D_div = (B-A+1)//D + 1
else:
    D_div = (B-A+1)//D
if A%(lcm(C,D)) == 0 or B%(lcm(C,D)) == 0:
    CD_div = (B-A+1)//lcm(C,D) + 1
print((B-A+1) - C_div -D_div + CD_div)

### FIXED CODE ###

from fractions import gcd
A,B,C,D = map(int,input().split())
C_div = B//C - (A-1)//C
D_div = B//D - (A-1)//D
CD = (C * D) // gcd(C, D)
CD_div = B//CD - (A-1)//CD
print(B-A+1 - C_div - D_div + CD_div)
import sys
from functools import reduce
from math import gcd

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def eratosthenes(n):
    prime = [2]
    if n == 2:
        return prime
    limit = int(n ** 0.5)
    data = [i + 1 for i in range(2, n, 2)]
    res = [0] * (n + 1)
    res[1] = 1
    for i in range(2, n, 2):
        res[i] = 2
    while True:
        p = data[0]
        if limit <= p:
            return res
        prime.append(p)
        res[p] = p
        for e in data:
            if e % p != 0:
                res[e] = p
        data = [e for e in data if e % p != 0]


def solve():
    _ = int(rl())
    A = list(map(int, rl().split()))
    
    prime_fact = eratosthenes(10 ** 6)
    p_flg = True
    prime_fact_set = set()
    for ai in A:
        num = ai
        prime_fact_ai = set()
        while num != 1:
            prime_fact_ai.add(prime_fact[num])
            num //= prime_fact[num]
        for p in prime_fact_ai:
            if p in prime_fact_set:
                p_flg = False
                break
            prime_fact_set.add(p)
        if not p_flg:
            break
    
    if p_flg:
        print('pairwise coprime')
        return
    
    gcd_a = reduce(gcd, A)
    if gcd_a == 1:
        print('setwise coprime')
        return
    
    print('not coprime')


if __name__ == '__main__':
    solve()


### FIXED CODE ###

import sys
from functools import reduce
from math import gcd

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def eratosthenes(n):
    prime = [2]
    if n == 2:
        return prime
    limit = int(n ** 0.5)
    data = [i + 1 for i in range(2, n, 2)]
    res = [0] * (n + 1)
    res[1] = 1
    for i in range(2, n + 1, 2):
        res[i] = 2
    while True:
        p = data[0]
        if limit <= p:
            for e in data:
                res[e] = e
            return res
        prime.append(p)
        res[p] = p
        for e in data:
            if e % p == 0:
                res[e] = p
        data = [e for e in data if e % p != 0]


def solve():
    _ = int(rl())
    A = list(map(int, rl().split()))
    
    prime_fact = eratosthenes(10 ** 6)
    p_flg = True
    prime_fact_set = set()
    for ai in A:
        num = ai
        prime_fact_ai = set()
        while num != 1:
            prime_fact_ai.add(prime_fact[num])
            num //= prime_fact[num]
        for p in prime_fact_ai:
            if p in prime_fact_set:
                p_flg = False
                break
            prime_fact_set.add(p)
        if not p_flg:
            break
    
    if p_flg:
        print('pairwise coprime')
        return
    
    gcd_a = reduce(gcd, A)
    if gcd_a == 1:
        print('setwise coprime')
        return
    
    print('not coprime')


if __name__ == '__main__':
    solve()
X, A, B = map(int, input().split())
if A <= B:
    print("delicious")
elif (B-A) <= X:
    pirnt("safe")
else:
    print("dangerous")

### FIXED CODE ###

X, A, B = map(int, input().split())
if B <= A:
    print("delicious")
else:
    if (B-A) <= X:
        print("safe")
    if (B-A) > X:
        print("dangerous")