Harryxun/stf_run huggingface dataset:
a = [list(map(int, input().split())) for i in range(3)]
output =[[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
check==False
for k in range(n):
    b=int(input())
    for i in range(3):
        for j in range(3):
            if a[i][j]==b:
                output[i][j]=1
for i in range(3):
    if output[i][0]*output[i][1]*output[i][2]==1:
        check=True
    elif output[0][i]*output[1][i]*output[2][i]==1:
        check=True
if output[0][0]*output[1][1]*output[2][2]==1:
    check=True
elif output[2][0]*output[1][1]*output[0][2]==1:
    check=True
if check==True:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a = [list(map(int, input().split())) for i in range(3)]
output =[[0,0,0],[0,0,0],[0,0,0]]
n = int(input())
check=False
for k in range(n):
    b=int(input())
    for i in range(3):
        for j in range(3):
            if a[i][j]==b:
                output[i][j]=1
for i in range(3):
    if output[i][0]*output[i][1]*output[i][2]==1:
        check=True
    elif output[0][i]*output[1][i]*output[2][i]==1:
        check=True
if output[0][0]*output[1][1]*output[2][2]==1:
    check=True
elif output[2][0]*output[1][1]*output[0][2]==1:
    check=True
if check==True:
    print('Yes')
else:
    print('No')
import sys

def add_count(addnum, relations, counters, nodelist):
  new_nodelist = []
  for node in nodelist:
    if node not in relations:
      continue
    else:
      new_nodelist = new_nodelist + relations[node]
      for child in relations[node]:
        counters[child-1] += addnum
  
  if len(new_nodelist) == 0:
    return counters
  else:
    return add_count(addnum, relations, counters, new_nodelist)

N, Q = map(int, sys.stdin.readline().split())
alist = list(list(map(int, sys.stdin.readline().split())) for i in range(N-1))
qlist = list(list(map(int, sys.stdin.readline().split())) for i in range(Q))

counters = [0 for i in range(N)]
relations = {}
for a in alist:
  if a[0] not in relations:
    relations[a[0]] = [a[1]]
  else:
    relations[a[0]].append(a[1])
    
for q in qlist:
  counters[q[0]-1] += q[1]
  counters = add_count(q[1], relations, counters, [q[0]])

print(' '.join(map(str,counters)))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)
input=lambda :sys.stdin.readline()

def sol():

  N,Q = map(int,input().split())
  graph = [[] for i in range(N)]
  ans = [0 for i in range(N)]
  for _ in range(N-1):
    a,b = map(int,input().split())
    graph[a-1].append(b-1)
    graph[b-1].append(a-1)

  for _ in range(Q):
    p, x = map(int,input().split())
    ans[p-1] += x 
 
  def dfs(v,p=-1):
    for u in graph[v]:
      if u == p: continue
      ans[u] += ans[v]
      dfs(u,v)
  dfs(0)
  print(*ans)

sol()
t = []
n = int(input())
for i in range(n):
    t.append(int(input()))



'''
n = 6
t=[4,1,5,7,5,4]
'''


minv = t[0]
maxv = t[1] - t[0]
for j in range(1,n):
    maxv = max([maxv,t[j] - minv])
    minv = min([minv,t[j])
print(maxv)

### FIXED CODE ###

t = []
n = int(input())
for i in range(n):
    t.append(int(input()))



'''
n = 6
t=[4,1,5,7,5,4]
'''


minv = t[0]
maxv = t[1] - t[0]
for j in range(1,n):
    maxv = max([maxv,t[j] - minv])
    minv = min([minv,t[j]])
print(maxv)
a = input().split()
N = int(a)
ans = 0.5
if N%2 == 0:
    pass
else:
    ans = (N+1)/(2*N)

print(ans)

### FIXED CODE ###

a = input().split()
N = int(a[0])
ans = 0.5
if N%2 == 0:
    pass
else:
    ans = (N+1)/(2*N)

print(ans)
n = int(input())
print(a + a*a + a*a*a)

### FIXED CODE ###

a = int(input())
print(a + a*a + a*a*a)
w,h,n = map(int,input().split())))
for i in range(n):
    a=list(map(int,input().split()))))
    if a[-1]==1:
        w-=a[0]
    elif a[-1]==2:
        w = a[0]
    elif a[-1]==3:
        h-=a[1]
    elif a[-1]==4:
        h = a[1]
print(h*w)

### FIXED CODE ###

W,H,N = map(int, input().split())
ans = [[1 for _ in range(W)] for _ in range(H)]

for i in range(N):
    x,y,a = map(int, input().split())
    if a == 1:
        for i in range(H):
            for j in range(x):
                ans[i][j] = 0
    if a == 2:
        for  i in range(H):
            for j in range(x, W):
                ans[i][j] = 0
    if a == 3:
        for i in range(y):
            for j in range(W):
                ans[i][j] = 0
    if a == 4:
        for i in range(y, H):
            for j in range(W):
                ans[i][j] = 0
print(sum([sum(ans[i]) for i in range(H)]))
# coding: utf-8

# In[1]:

import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))


# In[2]:

#import copy
#import numpy as np
try:
    from fractions import gcd
except:
    from math import gcd


# In[ ]:

# 左からn個の最大公約数を求める O(n)
# 右からn個の最大公約数を求める O(n)
# n個目を抜いた最大公約数は n-1個目までの公約数とn+1個目からの公約数との公約数


# In[3]:

lg = [1]*(N)
rg = [1]*(N)
ans = 0


# In[4]:

#print(lg)
#print(rg)
#print(A)


# In[ ]:

lg[0] = A[1]
rg[0] = A[N-2]
lg[1] = A[0]
rg[1] = A[N-1]
#print(lg, rg)
for i in range(1, N-1):
    #print(i)
    lg[i+1] = gcd(lg[i], A[i])
    #print(lg[i], A[i])
    rg[i+1] = gcd(rg[i], A[N-1-i])
    #print(rg[N-1-i], A[N-1-i])
#print(lg, rg)

ans = [0]*N
ans = [gcd(lg[i], rg[N-1-i]) for i in range(N)]
#for i in range(N):
    #print(i, lg[i], rg[N-i-1])
    #ans = gcd(lg[i], rg[N-i-1])
print(max(ans))


# In[6]:

#print(ans)



### FIXED CODE ###


# coding: utf-8

# In[ ]:

A, B, T = map(int, input().split())


# In[ ]:

#A, B, T = 3, 5, 7


# In[ ]:

print(T//A*B)
N=int(input())
B=list(map(int,input().split()))
total=B[0]
if N==2:
    print(B[0]*2)
    exit()
    
if N==3:
    print(B[0]+min(B[1],B[0])+B[2])
    exit()
for i in range(N-2):
    total+=min(B[i],B[i+1])
    
#if N%2==0:
total+=max(B[-1],B[-2])
print(total)

### FIXED CODE ###

N=int(input())
B=list(map(int,input().split()))
total=B[0]
if N==2:
    print(B[0]*2)
    exit()
    
if N==3:
    print(B[0]+min(B[1],B[0])+B[1])
    exit()
for i in range(N-2):
    total+=min(B[i],B[i+1])
    
#if N%2==0:
total+=B[-1]
print(total)
def main():
 n,a,d = int(input()),list(map(int, input().split())),[0]*n
 for i,x in enumerate(a):
  if i+x < n: d[i+x] += 1
 print(sum([d[i-x] for i,x in enumerate(a) if i-x>=0]))
main()

### FIXED CODE ###

from collections import defaultdict
n = int(input())
a = list(map(int, input().split()))
d = defaultdict(int)
for i in range(n):
  d[i+a[i]] += 1
ans = 0
for i in range(n):
  ans += d[i-a[i]]
print(ans)
#!/usr/bin/env python3
#abc126 e

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

G = [[] for _ in range(N)]
for i in range(M):
    G[XYZ[i][0]-1].append(XYZ[i][1])
    G[XYZ[i][1]-1].append(XYZ[i][0])

check = [False for _ in range(N)]#各頂点を訪問したかどうか
def DFS(G,start):
    check[start-1] = True
    for i in G[start-1]:
        if not check[i-1]:
            DFS(G,i)
    return
ans = 0
for i in range(N):
    if not check[i]:
        DFS(G,i+1)
        ans += 1
print(ans)

### FIXED CODE ###

#!/usr/bin/env python3
#abc126 e

import sys
sys.setrecursionlimit(1000000)
N,M = list(map(int,input().split()))
XYZ = [list(map(int,input().split())) for _ in range(M)]

G = [[] for _ in range(N)]

for i in XYZ:
    G[i[0]-1].append(i[1])
    G[i[1]-1].append(i[0])

check = [False for _ in range(N)]#各頂点を訪問したかどうか

def DFS(G,s):
    check[s-1] = True
    for i in G[s-1]:
        if not check[i-1]:
            DFS(G,i)
ans = 0
for i in range(N):
    if not check[i]:
        DFS(G,i+1)
        ans += 1
print(ans)
n, m, k = input().split()
a = input().split()
b = input().split()

n = int(n)
m = int(m)
k = int(k)
a = list(map(int, a))
b = list(map(int, b))

a = a.extend(b).sort()
add = 0

for item in a:
  if add >= k:
    break
  add += item
  
print(add)

### FIXED CODE ###

n, m, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

a, b = [0], [0]

for i in range(n):
  a.append(a[i] + A[i])
  
for i in range(m):
  b.append(b[i] + B[i])
  
ans, j = 0, m

for i in range(n+1):
  if a[i] > k:
    break
  while a[i] + b[j] > k:
    j -= 1
  ans = max(ans, i+j)

print(ans)
S = str(input())
F = int(S[0:2])
T = int(S[2:4])

def Greaterthan12(x):
    if x > 12:
        return 0
    else:
        return 1
        
Fjudge = BorS(F)
Tjudge = BorS(T)
if Fjudge == 0:
    if Tjudge == 0:
        print("NA")
    else:
        print("YYMM")
else:
    if Tjudge == 0:
        print("MMYY")
    else:
        print("AMBIGUOUS")

### FIXED CODE ###

S = str(input())
F = int(S[0:2])
T = int(S[2:4])

def Greaterthan12(x):
    if x > 12:
        return 0
    else:
        if x == 0:
            return 0
        else:
            return 1
        
Fjudge = Greaterthan12(F)
Tjudge = Greaterthan12(T)
if Fjudge == 0:
    if Tjudge == 0:
        print("NA")
    else:
        print("YYMM")
else:
    if Tjudge == 0:
        print("MMYY")
    else:
        print("AMBIGUOUS")
N = int(input())
A = list(map(int,input().split()))
A.sort()
import numpy as np

l = np.array([0] * (10**6 + 10))
for i in range(1,N):
  if A[i-1]!=A[i]:
    l[A[i]] += 1
    
if A[0]!=A[1]:
  l[A[0]] += 1
  
ans = 0
length = len(l)
for i in range(length):
  if l[i]>=1:
    ans += 1
    l[i::i] = 0
    
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
if N==1:
  print(1)
else:
  A.sort()
  import numpy as np

  l = np.array([0] * (10**6 + 10))
  m = np.array([0] * (10**6 + 10))
  for i in range(N):
    l[A[i]] += 1
    m[A[i]] += 1

  ans = 0
  length = len(l)
  for i in range(length):
    if l[i]==1:
      ans += 1
    
    if m[i]>=1:
      l[i::i] = 0

  print(ans)
import sys

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

A = []
for l in sys.stdin:
    A.append(int(l))
    
need_day = sum(A)
    
if N < need_day:
    print(-1)
else:
    print(N-need_day)

### FIXED CODE ###

N, M = map(int, input().split())
A = list(map(int,input().split()))

need_day = sum(A)

if N < need_day:
    print(-1)
else:
    print(N-need_day)
p=print
r=range
def a(i,j,k,l=0):p("+<"[l],i,j,k)
def b(i,l=0):a(i,i,i+l)
def d(x,i):
	for t in r(30):b(p:=i+t+30);a(q:=p+1,n,q);[*map(b,r(q,v:=i+60))];a(v,x,i+t,1);b(p);a(q,i+t,q)
p(n:=3933)
a(0,1,n)
a(2,n,n,1)
a(0,n,0)
a(1,n,1)
d(0,9)
d(1,60)
for t in r(59):b(2,2,2);[t<s+30<60!=(a(9+t-s,60+s,5),a(n,5,6,1),a(2,6,2))for s in r(t+1)]

### FIXED CODE ###

n=97
r=range
L='<'
P='+'
l=[3933,P,0,1,n,L,2,n,n,P,0,n,3,P,1,n,4]
a=lambda i,j:[P,i,j,i]
b=lambda i:[P,i,i,i+1]
def d(x,i,j):
	return sum([sum([b(j+t-1),a(j+t,n),*(b(s)for s in r(j+t,j+29)),[L,j+29,x,i+t],b(j+t-1),a(j+t,i+t)],[])for t in r(30)],[])
l+=d(3,5,36)
l+=d(4,36,67)
for t in r(59):
	l+=a(2,2)
	for s in r(t+1):
		if t-30<s<30:l+=[P,5+t-s,36+s,98];l+=[L,n,98,99];l+=a(2,99)
print(*l)
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
from itertools import product
from collections import deque
def resolve():
    h,w,k=map(int,input().split())
    G=[list(input()) for _ in range(h)]
    D=[(1,0),(-1,0),(0,1),(0,-1)]
    for i,j in product(range(h),range(w)):
        if(G[i][j]=='S'):
            i0,j0=i,j
            break

    dist=[[INF]*w for _ in range(h)]
    dist[i0][j0]=0
    # BFS
    Q=deque([(i0,j0)])
    while(Q):
        i,j=Q.popleft()
        for di,dj in D:
            ni=i+di; nj=j+dj
            if(not (0<=ni<h and 0<=nj<w)): continue
            if(dist[ni][nj]!=INF or G[ni][nj]=='#'): continue
            dist[ni][nj]=dist[i][j]+1
            Q.append((ni,nj))

    print(dist)

    後は距離が k 以下の点から一直線に外に向かえばよい
    ans=INF
    for i,j in product(range(h),range(w)):
        if(dist[i][j]<=k):
            d=min(i,j,h-i-1,w-j-1)
            if(d==0):
                print(1)
                return
            else:
                ans=min(ans,2+(d-1)//k)
    print(ans)
resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
from itertools import product
from collections import deque
def resolve():
    h,w,k=map(int,input().split())
    G=[list(input()) for _ in range(h)]
    D=[(1,0),(-1,0),(0,1),(0,-1)]
    for i,j in product(range(h),range(w)):
        if(G[i][j]=='S'):
            i0,j0=i,j
            break

    dist=[[INF]*w for _ in range(h)]
    dist[i0][j0]=0
    # BFS
    Q=deque([(i0,j0)])
    while(Q):
        i,j=Q.popleft()
        for di,dj in D:
            ni=i+di; nj=j+dj
            if(not (0<=ni<h and 0<=nj<w)): continue
            if(dist[ni][nj]!=INF or G[ni][nj]=='#'): continue
            dist[ni][nj]=dist[i][j]+1
            Q.append((ni,nj))

    # 後は距離が k 以下の点から一直線に外に向かえばよい
    ans=INF
    for i,j in product(range(h),range(w)):
        if(dist[i][j]<=k):
            d=min(i,j,h-i-1,w-j-1)
            if(d==0):
                print(1)
                return
            else:
                ans=min(ans,2+(d-1)//k)
    print(ans)
resolve()
n, m = map(int, input().split())
a, b, num = [0]*n, [0]*n, [0]*n
num[0]=1
for i in range(m):
  a[i], b[i] = map(int, input().split())
  num[a[i]-1]=b[i]
for i in range(m):
  if num[a[i]-1]!=b[i]:
    print(-1)
    exit()

ans=''
for i in num:
  ans+=str(i)
ans = int(ans)
ans = str(ans)
if len(ans)==n:
  print(ans)
else:
  print(-1)

### FIXED CODE ###

n, m = map(int, input().split())
a, b, num = [0]*m, [0]*m, [0]*n
if n!=1:
  num[0]=1
for i in range(m):
  a[i], b[i] = map(int, input().split())
  num[a[i]-1]=b[i]
for i in range(m):
  if num[a[i]-1]!=b[i]:
    print(-1)
    exit()

ans=''
for i in num:
  ans+=str(i)
ans = int(ans)
ans = str(ans)
if len(ans)==n:
  print(ans)
else:
  print(-1)
from math import gcd
a,b,c,d=map(int,input().split(' '))
r1=b-b%c
if a%c!=0:
	l1=a-a%c+c
else:
	l1=a
r2=b-b%d
if a%d!=0:
	l2=a-a%d+d
else:
	l2=a
lcm=(c*d)//gcd(c,d)
r3=b-b%lcm
if a%lcm!=0:
	l3=a-a%lcm+lcm
else:
	l3=a
nc=(r1-l1+c)//c
nd=(r2-l2+d)//d
nlcm=(r3-l3+lcm)//lcm
divi=nc+nd-nlcm
out=b-a+1
if c>a and c>b and d>a and d>b:
	print(0)
else:
	print((out-divi)%(10**9+7))




### FIXED CODE ###

from fractions import gcd
a,b,c,d=map(int,input().split(' '))
r1=b-b%c
if a%c!=0:
	l1=a-a%c+c
else:
	l1=a
r2=b-b%d
if a%d!=0:
	l2=a-a%d+d
else:
	l2=a
lcm=(c*d)//gcd(c,d)
r3=b-b%lcm
if a%lcm!=0:
	l3=a-a%lcm+lcm
else:
	l3=a
nc=(r1-l1+c)//c
nd=(r2-l2+d)//d
nlcm=(r3-l3+lcm)//lcm
divi=nc+nd-nlcm
out=b-a+1
if c>a and c>b and d>a and d>b:
	print(0)
else:
	print(out-divi)
def Cakes_and_Donuts(N):
    CP = 4
    DP = 7
    
    if N <= 3:
        return f"No"
    
    for i in range(26):
        for j in range(15):
            if (CP * i + DP * j) == N:
                return f"Yes"
    
    return f"No"

### FIXED CODE ###

def main(N):
  
    CP = 4
    DP = 7
    
    if N <= 3:
        return "No"
    
    for i in range(100):
        for j in range(100):
            if (CP * i + DP * j) == N:
                return "Yes"
    return "No"
N = int(input())
print(main(N))
n = int(input())
count = 0
for a in range(1,n):
    count += int((n-1)/a)
print(count)n = int(input())
count = 0
for a in range(1,n):
    count += int((n-1)/a)
print(count)

### FIXED CODE ###

n = int(input())
count = 0
for a in range(1,n):
    count += (n-1)//a
print(count)
n = int(input())
h = list(map(int, input().split()))
i = 0
count = 0
ans = []
while i < n - 1:
  if h[i] < h[i + 1]:
    ans.append(count)
    count = 0
  else:
    count += 1
  i += 1
print(max(ans))

### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
i = 0
count = 0
ans = []
while i < n - 1:
  if h[i] < h[i + 1]:
    ans.append(count)
    count = 0
  else:
    count += 1
  i += 1
ans.append(count)
print(max(ans))
num = input()

if num % 2 == 0:
    print(num)
else:
    print(num*2)

### FIXED CODE ###

num = int(input())

if num % 2 == 0:
    print(num)
else:
    print(num*2)
s = input()
print(s.replace(' ', '')

### FIXED CODE ###

s, t = input().split()
print(t + s)
import math

N=int(input())

G=[[] for i in range(N)]
for _ in range(N-1):
	a,b=map(lambda x:int(x)-1,input().split())
	G[a].append(b)
	G[b].append(a)


seen=[False]*N
seen[0]=True
depth=[0]*N
sub_tree=[1]*N
ne=[0]


def dfs(d, i, p):
	for t in G[i]:
		if t!=p:
			depth[t]=d
			dfs(d+1, t, i)
			
			sub_tree[i]+=sub_tree[t]



dfs(1,0,-1)

d=depth[-1]
a=sub_tree[0]-sub_tree[-1]-d
b=sub_tree[-1]-1

a+=math.ceil(d/2)
b+=d//2

print('Fennec' if a>b else 'Snuke')


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

import math

N=int(input())

G=[[] for i in range(N)]
for _ in range(N-1):
	a,b=map(lambda x:int(x)-1,input().split())
	G[a].append(b)
	G[b].append(a)

depth=[[0]*N for i in range(2)]

def dfs(d, i, p, k=0):
	for t in G[i]:
		if t!=p:
			depth[k][t]=d
			dfs(d+1, t, i,k)


dfs(1,0,-1, 0)
dfs(1,N-1,-1, 1)

cnt=0
for i,j in zip(depth[0], depth[1]):
	if i<=j:
		cnt+=1

print('Fennec' if cnt*2>N else 'Snuke')
# coding: utf-8
import re
import bisect
from datetime import datetime as dt
import bisect
import math

def gcd(a, b):
    return int(math.gcd(a, b))

def lcm(a, b):
    return a / gcd(a, b) * b

class slist(list):
    def __init__(self, *args, **kw):
        list.__init__(self, *args, **kw)
        self.sort()

    def append(self, value):
        bisect.insort(self,value)

    def index_left(self, value):
        return bisect.bisect_left(self, value)

def calc(n, a, b):
    aa = (int(n/a))
    bb = (int(n/b))
    ab = (int(n/lcm(a,b)))
    return aa + bb - ab

if __name__ == '__main__':
    a, b, c, d = map(int, input().split())
    ans = calc(b, c, d) - calc(a - 1, c, d)
    print(b - a + 1 - ans)


### FIXED CODE ###

# coding: utf-8
import re
import bisect
from datetime import datetime as dt
import bisect
import fractions

def gcd(a, b):
    return fractions.gcd(a, b)

def lcm(a, b):
    return a * b // gcd(a, b)

def calc(n, a, b):
    return n//a + n//b - n//lcm(a,b)

if __name__ == '__main__':
    a, b, c, d = map(int, input().split())
    ## これで通った
    # num1 = b - calc(b,c,d)
    # num2 = (a-1) - calc(a-1, c,d)
    # print(num1-num2)

    ## これはとおらない
    ans = calc(b, c, d) - calc(a - 1, c, d)
    print(b - a + 1 - ans)
A, B, K = map(int,input().split())
if  A+B >= K
  print(0,0)
else:
  for _ in range(K):
    if A != 0:
      A = A - 1
    elif B != 0:
      B = B - 1
    else:
      break
  print(A,B)

### FIXED CODE ###

a,b,c = map(int, input().split())
if a<=c:
    if b<=c-a:
        print('0 0')
    else:
        print('0 {}'.format(a+b-c))
else:
    print('{} {}'.format(a-c,b))
import fractions

n = int(input())
ai = [int(i) for i in input().split()]


mod = 10**9+7

if n == 1:
    print(1)
    exit()

b_li = []

seki = 1

for i in range(n):
    seki *= ai[i]
    seki %= mod

for i in range(n):
    b_li.append(seki/ai[i])

t_gcd = fractions.gcd(b_li[0],b_li[1])

for i in range(n-2):
    t_gcd = int(fractions.gcd(t_gcd,b_li[i+2]))
    
ans = 0

for i in range(n):
    ans += int(seki/t_gcd/ai[i])
    
print(ans%mod)

### FIXED CODE ###

import collections
import math
n = int(input())
ai = [int(i) for i in input().split()]

mod = 10**9+7

if n == 1:
    print(1)
    exit()
    
    
# 素因数分解、辞書で返すやつ
# mathをimportする
def prime(n):
    factor = {}
    tmp = int(math.sqrt(n)) + 1
    for num in range(2, tmp):
        while n % num == 0:
            n //= num
            if not num in factor.keys():
                factor[num] = 1
            else:
                factor[num] += 1
        if num > n:
            break
    if n != 1:
        if not n in factor.keys():
            factor[n] = 1
        else:
            factor[n] += 1
    return factor


dic = {}
for a in ai:
    pr = prime(a)
    for num, count in pr.items():
        if not num in dic.keys():
            dic[num] = count
        else:
            if dic[num] < count:
                dic[num] = count

kari = 1
for num,count in dic.items():
    kari *= pow(num,count,mod)
    kari %= mod

kari_old = kari
ans = 0

for i in range(n):
    kari = kari_old
    #com_ab_new = copy.deepcopy(com_ab)
    #print(com_ab,com_ab_new)
    #kari = 1
    #for j in range(kosu):
    #kari *= pow(sosu_li[j][0],com_ab[sosu_li[j][0]],mod)
    kari *= pow(ai[i],mod-2,mod)
    ans += kari
    ans %= mod
    #print(ans)
    #print(ans)
        
print(ans)
import sys
input = sys.stdin.readline
from math import factorial as fact

MOD = 10 ** 9 + 7


def inv(x):
    return pow(x, MOD - 2, MOD)


def comb(n, r):
    return (fact(n) * inv(fact(n - r)) * inv(fact(r))) % MOD


def main():
    X, Y = [int(x) for x in input().split()]

    y = (X - 2 * Y) // (-3)
    x = (X - y) // 2

    print(x, y)
    if X == x * 2 + y and Y == x + 2 * y:
        a = comb(x + y, x)
        print(a % MOD)
    else:
        print(0)









if __name__ == '__main__':
    main()



### FIXED CODE ###

import sys
input = sys.stdin.readline

def modPow(a, x, p):
    res = 1
    while x > 0:
        if x % 2 != 0:
            res = res * a % p
        a = a * a % p
        x = x // 2
    return res

def modInverse(a, p):
    return modPow(a, p - 2, p)

def modBinomial(n, k, p):
    numerator = 1
    for i in range(k):
        numerator = (numerator * (n - i)) % p

    denominator = 1
    for i in range(1, k + 1):
        denominator = (denominator * i) % p

    return (numerator * modInverse(denominator, p)) % p


def main():
    X, Y = [int(x) for x in input().split()]

    MOD = 10 ** 9 + 7
    y = (X - 2 * Y) // (-3)
    x = (X - y) // 2

    if y < 0 or x < 0:
        print(0)
        exit()
    if X == x * 2 + y and Y == x + 2 * y:
        print(modBinomial(x + y, x, MOD))
    else:
        print(0)









if __name__ == '__main__':
    main()
S=input('')
if S='Sunny':
  print('Cloudy')
elif S='Cloudy':
  print('Rainy')
else:
  print('Sunny')

### FIXED CODE ###

S=input('')
if S=='Sunny':
  print('Cloudy')
elif S=='Cloudy':
  print('Rainy')
else:
  print('Sunny')
H, W = map(int,input().split())
S = [input() for i in range(H)]
dp = [[0 for _ in range(H)] for _ in range(W)]
dp[0][0] = 1 if S[0][0] == "#" else 0
for i in range(1, H):
    if S[i][0] == "#":
        if S[i-1][0] == "#":
            dp[i][0] =  dp[i-1][0]
        else:
             dp[i][0] = dp[i-1][0] + 1
    else:
        dp[i][0] =  dp[i-1][0]

for j in range(1, W):
    if S[0][j] == "#":
        if S[0][j-1] == "#":
            dp[0][j] =  dp[0][j-1]
        else:
             dp[0][j] = dp[0][j-1] + 1
    else:
        dp[0][j] =  dp[0][j-1]

for i in range(1,H):
    for j in range(1,W):
        up = dp[i-1][j] + (1 if S[i-1][j] != "#" and S[i][j] == "#" else 0) 
        left = dp[i][j-1] + (1 if S[i][j-1] != "#" and S[i][j] == "#" else 0)
        dp[i][j] = min(up, left)
print(dp[-1][-1])

### FIXED CODE ###

from collections import deque

H, W = map(int,input().split())
S = [input() for i in range(H)]
dp = [[0 for _ in range(W)] for _ in range(H)]
dp[0][0] = 1 if S[0][0] == "#" else 0
for i in range(1, H):
    if S[i][0] == "#":
        if S[i-1][0] == "#":
            dp[i][0] =  dp[i-1][0]
        else:
             dp[i][0] = dp[i-1][0] + 1
    else:
        dp[i][0] =  dp[i-1][0]

for j in range(1, W):
    if S[0][j] == "#":
        if S[0][j-1] == "#":
            dp[0][j] =  dp[0][j-1]
        else:
             dp[0][j] = dp[0][j-1] + 1
    else:
        dp[0][j] =  dp[0][j-1]

for i in range(1,H):
    for j in range(1,W):
        up = dp[i-1][j] + (1 if S[i-1][j] != "#" and S[i][j] == "#" else 0) 
        left = dp[i][j-1] + (1 if S[i][j-1] != "#" and S[i][j] == "#" else 0)
        dp[i][j] = min(up, left)
print(dp[-1][-1])
n,m=(int(i) for i in input().split())
a=0
b=0
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)
	else:
  		print(0)
else:
  print(0)


### FIXED CODE ###

a,b=(int(i) for i in input().split())
if a<=5:
  print(0)
elif 5<a<=12:
  print(b//2)
else:
  print(b)
A, B, X = int(x) for x in input().split()
if (A <= X) and ((A + B) >= X):
  print("YES")
else:
  print("NO")

### FIXED CODE ###

A, B, X = (int(x) for x in input().split())
if (A <= X) and ((A + B) >= X):
  print("YES")
else:
  print("NO")