Harryxun/stf_run huggingface dataset:
def main():
    n, m = map(int, input().split())
    t = [True]*n
    s = [True]*(n+1)
    x = 1
    for _ in range(m):
        while not s[x]:
            x += 1
        s[x] = False
        for i in range(1, n+1):
            if t[i] and x+i<n+1 and s[x+i]:
                print(x, x+i)
                t[i] = False
                s[x+i] = False
                break

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    n, m = map(int, input().split())
    ans = []
    t = [True]*(n+1)
    l = n//2 - 1
    for i in range(1, n//2):
        if l <= 0:
            break
        if not t[i] or not t[i+l]:
            continue
        ans.append([i, i+l])
        t[i] = False
        t[i+l] = False
        l -= 2
    if n % 2 == 1:
        l = n//2
        for i in range(n//2, n):
            if l <= 0:
                break
            if not t[i] or not t[i+l]:
                continue
            ans.append([i, i+l])
            t[i] = False
            t[i+l] = False
            l -= 2
    else:
        l = n//2 - 2
        for i in range(n//2, n):
            if l <= 0:
                break
            if not t[i] or not t[i+l]:
                continue
            ans.append([i, i+l])
            t[i] = False
            t[i+l] = False
            l -= 2
    for i in range(m):
        print(ans[i][0], ans[i][1])

if __name__ == "__main__":
    main()
n = int(input())
for i in range(1, 10):
  for j in range(1, 10):
    print('Yes' if i*j == n)
print('No')

### FIXED CODE ###

n = int(input())
for i in range(9):
  for j in range(9):
    if (i+1)*(j+1) == n:
      print('Yes')
      exit()
print('No')
N, M = map(int, input().split())  # N枚のカード, 操作内容がMセット
A = list(map(int, input().split()))

A.sort()
kakikae = []

for i in range(M):
    B, C = map(int, input().split())
    for i in range(B):
        kakikae.append(C)

kakikae.sort(reverse=True)

for i in range(N):
    if kakikae[i] > A[i]:
        A[i] = kakikae[i]
    else:
        break
print(sum(A))


### FIXED CODE ###

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

# 二次元配列を作る
BC = []
for i in range(M):
    b, c = list(map(int, input().split()))
    BC.append([b, c])

BC = sorted(BC, reverse=True, key=lambda x: x[1])  # Cの値で降順にソートされる

cnt = 0
com = []

for b, c in BC:
    cnt += b
    if cnt > N:  # 操作を加える回数がNを超えることはない
        add = N-cnt+b  # comの要素数の調整
        com.extend([c]*add)
        break
    else:
        com.extend([c]*b)

A.extend(com)

A.sort(reverse=True)
print(sum(A[:N]))
n = int(input())
a = list(map(int, input().split())
x=0
s=0
l=0
c=0
for r,b in enumerate(a):
  x^=b
  s+=b
  while x<s:
    x^=a[l]
    s-=a[l]
    l+=1
  c+=r-l+1
print(c)


### FIXED CODE ###

def main():
    N = int(input())
    A = list(map(int, input().split()))
    x = 0
    s = 0
    r = 0
    res = 0
    for l in range(N):
        while N > r:
            if s & A[r] != 0: break
            s += A[r]
            r += 1

        s -= A[l]
        res += r - l

    print(res)
if __name__ == '__main__':
    main()
from collections import deque
n, k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10 ** 9 + 7

p = []
m = []
for i in a:
    if i >= 0:p.append(i)
    elif i < 0:m.append(i)

p.sort(reverse=True)
m.sort()
res = 1

if len(p) == 0 and k % 2 == 1:
    for i in range(k):
        res = (res * m[-(i + 1)]) %mod
    print(res)

else:
    p_ind = 0
    m_ind = 0
    while k:
        
        temp = p[p_ind] * p[p_ind + 1] if p_ind + 1 < len(p) else p[p_ind]
        temp1 = m[m_ind] * m[m_ind + 1] if m_ind + 1 < len(m) else m[m_ind]
        if temp > temp1 or k == 1:
            res = (res * p[p_ind]) %mod
            p_ind += 1
            k -= 1
        else:
            res = (res * temp1) %mod
            m_ind += 2
            k -= 2
    print(res)

### FIXED CODE ###

from collections import deque
n, k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10 ** 9 + 7

p = []
m = []
for i in a:
    if i >= 0:p.append(i)
    elif i < 0:m.append(i)

p.sort(reverse=True)
m.sort()
res = 1
if n == k:
    for i in a:
        res = (res * i) %mod
    print(res)
    exit()
    
if len(p) == 0 and k % 2 == 1:
    for i in range(k):
        res = (res * m[-(i + 1)]) %mod
    print(res)

else:
    p_ind = 0
    m_ind = 0
    while k:
        if k == 1:
            res = (res * p[p_ind]) % mod
            break
        
        temp = p[p_ind] * p[p_ind + 1] if p_ind + 1 < len(p) else 0
        temp1 = m[m_ind] * m[m_ind + 1] if m_ind + 1 < len(m) else 0
        if temp > temp1:
            res = (res * p[p_ind]) %mod
            p_ind += 1
            k -= 1
        else:
            res = (res * temp1) %mod
            m_ind += 2
            k -= 2
    print(res)
x = int(input())
a = []
for i in range(-90, 90):
  for j in range(-90, 90):
    if i**5 - j**5 == x:
      a.append([i, j])
      break
      
print(*a[0])

### FIXED CODE ###

x = int(input())
a = []
for i in range(-200, 200):
  for j in range(-200, 200):
    if i**5 - j**5 == x:
      a.append([i, j])
      break
      
print(*a[0])
n = int(input())
s = input()
siro = s.count(".")
ren = 0
i = 1
while s[-i] == "#":
    ren += 1
    i += 1
print(min(siro,n-ren-siro))


### FIXED CODE ###

n = int(input())
s = input()
l = [0]*(n+1)
count = 0
for i in range(len(s)) :
    if s[i] == "." :
        count += 1
    l[i+1] = count
siro = l[-1]
ans = 1000000000000000000000
for i in range(n+1):
    ans = min(ans,i-2*l[i]+siro)
print(ans)
N=int(input())
if N%2==0:
  answer = 1.0/2
else:
  answer = ((N-1)/2 + 1) /((N-1)/2)
return answer
 

### FIXED CODE ###

N=int(input())
if N%2==0:
  answer = 1.0/2
else:
  answer = ((N-1)/2 + 1) /N
print(answer)
from collections import deque
import math
maxloc = -10
h, w = map(int, input().split())
maze = [list(input()) for i in range(h)]
for y in range(h):
    for x in range(w):
        if maze[y][x]=='.':
            maze[y][x]=1000000

for i in range(h):
  for j in range(w):
    sy = i
    sx = j
    if(maze[sy-1][sx-1] != '#'):
      maze[sy-1][sx-1]=0
      for k in range(h):
        for l in range(w):
          gy = k
          gx = l
          if(maze[gy-1][gx-1] != '#'):
            que = deque([[sy-1, sx-1]])
            while que:
              y, x = que.popleft()
              for i, j in [(1,0),(0,1),(-1,0),(0,-1)]:
                nexty, nextx = y+i, x+j
                dist = maze[nexty][nextx]
                if(dist != '#'):
                  if dist > maze[y][x]+1:
                    maze[nexty][nextx] = maze[y][x]+1
                    que.append([nexty, nextx])
            if(int(maze[gy-1][gx-1])>maxloc):
              maxloc = maze[gy-1][gx-1]
            
print(maxloc)

### FIXED CODE ###

def main():
  from collections import deque
  H, W = map(int, input().split())
  graph = [['#'] * (W+2) for _ in range(H+2)]
  for i in range(H):
    S = input()
    for j in range(W):
      graph[i+1][j+1] = S[j]

  def dfs(sx, sy):
    q = deque([(sx, sy)])
    dist = [[-1] * (W+2) for _ in range(H+2)]
    dist[sx][sy] = 0
    s = 0
    while q:
      x, y = q.popleft()
      dxy = [(1, 0), (-1, 0), (0, 1), (0, -1)]
      for dx, dy in dxy:
        nextx = x+dx
        nexty = y+dy
        if(dist[nextx][nexty] >= 0):
          continue
        if(graph[nextx][nexty] == '#'):
          continue
        dist[nextx][nexty] = dist[x][y] + 1
        q.append((nextx, nexty))
    for i in range(H+2):
      for j in range(W+2):
        if(dist[i][j] >= 0):
          s = max(s, dist[i][j])
    return s

  ans = 0  
  for sx in range(1, H+1):
    for sy in range(1, W+1):
      if(graph[sx][sy] == '.'):
          tmp = dfs(sx, sy)
          ans = max(ans, tmp)
          
  print(ans)
  
main()
import math

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

C = math.gcd(A, B)

def factorization(n):
    count = 0
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            count += 1
            while temp % i == 0:
                temp //= i

    return count

print(factorization(C) + 1)

### FIXED CODE ###

import fractions

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

C = fractions.gcd(A, B)

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b += 1
    if n > 1:
        fct.append(n)
    return fct

print(len(list(set(factorize(C)))) + 1)
https://atcoder.jp/contests/abc046/tasks/arc062_a
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  t,a=LI()
  l=[LI() for _ in range(n-1)]

  # t<=nt' and a<=na'
  # t/t'<=n and a/a'<=n
  for _t,_a in l:
    _n=max(-(-t//_t),-(-a//_a))
    t=_n*_t
    a=_n*_a

  return t+a

# main()
print(main())


### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  t,a=LI()
  l=[LI() for _ in range(n-1)]

  # t<=nt' and a<=na'
  # t/t'<=n and a/a'<=n
  for _t,_a in l:
    _n=max(-(-t//_t),-(-a//_a))
    t=_n*_t
    a=_n*_a

  return t+a

# main()
print(main())
mountain, answer = [], []

while(True):
  input = raw_input().split()
  if input[0] == 'push':
    mountain.insert(int(input[1]), input[2])
  elif input[0] == 'pop':
    answers.append(input[1])
    mountain.pop(input[1])
  elif input[0] == 'move':
    move_item = mountain[int(input[1])]
    mountain.pop(input[1])
    mountain.insert(input[2], move_item)
  elif input[0] == 'quit':
    break

for answer in answers:
  print answer

### FIXED CODE ###

n = input()
stack = [[] for i in range(n)]
while(True):
    s = raw_input().split()
    if(s[0] == "quit"):
        break
    if(s[0] == "push"):
        stack[int(s[1]) - 1].append(s[2])
    elif(s[0] == "pop"):
        print(stack[int(s[1]) - 1].pop())
    elif(s[0] == "move"):
        stack[int(s[2]) - 1].append(stack[int(s[1]) - 1].pop())
n = input()
bars = map(int,raw_input().split(' '))
bars.sort()
h1_cand=0
h2_cand=0
h1=0
h2=0
for i in range(n):
  m = n-1-i
  if h1 > 0:
    if h2_cand == bars[m]:
      h2 = h2_cand
      break
    else
      h2_cand = bars[m]
  else:
	if h1_cand == bars[m]:
    	h1 = h1_cand
    	h1_cand = 0
  	else:
    	h1_cand = bars[m]

print h1*h2

### FIXED CODE ###

n = input()
bars = map(int,raw_input().split(' '))
bars.sort()
h1_cand=0
h2_cand=0
h1=0
h2=0
for i in range(n):
  m = n-1-i
  if h1 > 0:
    if h2_cand == bars[m]:
      h2 = h2_cand
      break
    else:
      h2_cand = bars[m]
  else:
	if h1_cand == bars[m]:
    	  h1 = h1_cand
    	  h1_cand = 0
  	else:
    	  h1_cand = bars[m]
 
print h1*h2
N = int(input())
nums = [int(input()) for _ in range(N)]
ans = 0
nums_sorted = nums[:]
nums_sorted = list(set(nums_sorted))
nums_sorted.sort(reverse=True)
di = {}





for i in range(N-1):
    if nums[i] > nums[i+1]:
        ans += 1

nums_l = len(nums)
nums_s = len(list(set(nums)) )
ans += nums_l - nums_s
if len(nums_s) == 1:
    ans += 1



print(ans)

### FIXED CODE ###

import bisect
from collections import deque
N = int(input())
nums = deque()

for i in range(N):
    temp =  int(input())
    ind = bisect.bisect_left(nums, temp)
    if ind == 0:
        nums.appendleft(temp)
    else:
        nums[ind - 1] = temp
print(len(nums))
def main():
    return A*B

main()

### FIXED CODE ###

a, b = map(int,input().split())
def main(x,y):
    print(x*y)

main(a,b)
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
x=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    x=['X' if j==y else j for j in x]
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')

### FIXED CODE ###

A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
X=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    X=['X' if j==y else j for j in X]
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')
import math
A,B,C,D = map(int,input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
E = lcm(C, D)
sample = B-A
ans = sample - ((B//C-A//C) + (B//D-A//D)-(B//E-A//E))
print(ans)

### FIXED CODE ###

import fractions as f
a,b,c,d = map(int,input().split())
i = abs((a-1)//c-b//c)
j = abs((a-1)//d-b//d)
 
def lcm(x,y):
  return (x*y)//f.gcd(x,y)
l = lcm(c,d)
k = abs((a-1)//l-b//l)
print(b-a+1-(i+j-k))
x = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a = int(input())
print(a[a-1])

### FIXED CODE ###

x = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
a = int(input())
print(x[a-1])
a, b = map(int, input().split())

print(int(((a + b) / 2　+ 0.9)))



### FIXED CODE ###

a, b = map(int, input().split())

print(int((a + b) / 2 + 0.9))
n,k,x,y = [int(split()) for _ in range(4)]
print(k*x+(n-k)*y if n>=k else k*x)


### FIXED CODE ###

n,k,x,y = [int(input()) for _ in range(4)]
print(k*x+(n-k)*y if n>=k else n*x)
import math

def main():
    A, B, C, D = map(int, input().split())
    p = math.gcd(C, D)
    lcm = C * D // p
    dA = (A-1) - (A-1) // C - (A-1) // D + (A-1) // lcm
    dB = B - B // C - B // D + B // lcm
    return dB - dA


if __name__ == '__main__':
    print(main())

### FIXED CODE ###

def main():
    A, B, C, D = map(int, input().split())
    if C <= D: p = gcd(C, D)
    else: p = gcd(D, C)
    lcm = C * D // p
    dA = (A-1) - (A-1) // C - (A-1) // D + (A-1) // lcm
    dB = B - B // C - B // D + B // lcm
    return dB - dA

def gcd(a, b):
    if a == 0: return b
    return gcd(b % a, a)

if __name__ == '__main__':
    print(main())
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

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

n,a,b,c,d = readInts()
s = readChar()
if (a-b)*(c-d)<0:
	if "..." in s[max(a,b)-1:] and "##" not in s[min(a,b)]:
		print("Yes")
	else:
		print("No")
elif c<b:
	if "##" not in s[a:c] and "##" not in s[b:d]:
		print("Yes")
	else:
		print("No")
else:
	if "##" not in s[min(a,b):]:
		print("Yes")
	else:
		print("No")
	raise Exception

### FIXED CODE ###

from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

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

n,a,b,c,d = readInts()
a-=1
b-=1
c-=1
d-=1
s = readChar()
if (a-b)*(c-d)<0:
  if "..." in s[b-1:d+2] and "##" not in s[a:c]:
    print("Yes")
  else:
    print("No")
else:
  if "##" not in s[a:d+1]:
    print("Yes")
  else:
    print("No")
n,k=map(int,input().split())
h=list(map(int,input().split())

res=0

for i in h:
	if i>=k:
       res = res + 1
       
print(res)

### FIXED CODE ###

n, k = map(int,input().split())
h = list(map(int,input().split()))

res = 0
 
for i in h:
	if i >= k:
		res = res + 1
print(res)
from copy import deepcopy
from collections import deque
from itertools import product
import numpy as np
inputs = open(0).readlines()
class Grid():
    def __init__(self, grid, w=0, h=0, function=lambda x: x):
        self.w = w = w if w else len(grid[0])
        self.h = h = h if h else len(grid)
        dtype = type(function(grid[0][0]))
        self.grid = np.empty((h, w), dtype=dtype)
        for i, row in zip(range(h), grid):
            for j, val in zip(range(w), row):
                self.grid[i][j] = function(val)
    
    def is_valid_x(self, x):
        return 0 <= x < self.w
    def is_valid_y(self, y):
        return 0 <= y < self.h
    def is_valid_xy(self, x, y):
        return self.is_valid_x(x) and self.is_valid_y(y) 
    
    def __iter__(self):
        return iter(self.grid)
    def __repr__(self):
        return '\n'.join([' '.join(map(str, row)) for row in self.grid])
    def __getitem__(self, x):
        return self.grid[x]
    def __setitem__(self, x, val):
        self.grid[x] = val
        
h, w = map(int, inputs[0].split())
grid_origin = Grid(inputs[1:], function=lambda x: int(x == '.'))

def bfs(root):
    x, y, _ = root
    grid[y, x] = 0
    queue = deque([root])
    while queue:
        x, y, d = queue.popleft()
        for dx, dy in zip([1, 0, -1, 0], [0, 1, 0, -1]):
            if grid.is_valid_xy(x+dx, y+dy) and grid[y+dy, x+dx]:
                queue.append((x+dx, y+dy, d+1))
                grid[y+dy, x+dx] = 0
    return d-1
    
ans = 0
for i, j in product(range(h), range(w)):
    if grid_origin[i, j]:
        grid = deepcopy(grid_origin)
        ans = max(ans, bfs((j, i)))
print(ans)

### FIXED CODE ###

import sys
from copy import deepcopy
from collections import deque
from itertools import chain

chain_from_iterable = chain.from_iterable
inputs = sys.stdin.readlines()
h, w = map(int, inputs[0].split())
S = [list(map(lambda x: int(x=='.'), x)) for x in inputs[1:]]
S.insert(0, [0]*w)
S.append([0]*w)
for row in S:
    row.insert(0, 0)
    row.append(0)

max_dist = 0
for y in range(1, h+1):
    for x in range(1, w+1):
        if S[y][x] == 0:
            continue
        maze = deepcopy(S)
        maze_d = [[0]*(w+2) for _ in range(h+2)]
        queue = deque([(x, y, 0)])
        d = 0
        while queue:
            x, y, d = queue.popleft()
            d += 1
            maze[y][x] = 0
            if maze[y-1][x]:
                queue.append((x, y-1, d))
                maze[y-1][x] = 0
                maze_d[y-1][x] = d
            if maze[y][x-1]:
                queue.append((x-1, y, d))
                maze[y][x-1] = 0
                maze_d[y][x-1] = d
            if maze[y+1][x]:
                queue.append((x, y+1, d))
                maze[y+1][x] = 0
                maze_d[y+1][x] = d
            if maze[y][x+1]:
                queue.append((x+1, y, d))
                maze[y][x+1] = 0
                maze_d[y][x+1] = d
        max_dist = max(max_dist, max(chain_from_iterable(maze_d)))
print(max_dist)
# coding: utf-8
import math

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

N=int(input())
ans=lcm(1,int(input()))

for i in range(N-1):
    ans=lcm(ans,int(input()))

print(ans)

### FIXED CODE ###

# coding: utf-8
import fractions as math

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

N=int(input())
ans=lcm(1,int(input()))

for i in range(N-1):
    ans=lcm(ans,int(input()))

print(ans)
n = int(input())
p = list(map(int, input().split()))
sorted_p = sorted(p)
cnt = 0
for a, b in p, sorted_p:
    if a != b:
        cnt += 1
if cnt > 2:
    print("NO")
else:
    print("YES")


### FIXED CODE ###

n = int(input())
p = list(map(int, input().split()))
sorted_p = sorted(p)
cnt = 0
for a, b in zip(p, sorted_p):
    if a != b:
        cnt += 1
if cnt > 2:
    print("NO")
else:
    print("YES")
sum=0
max=0
for i in range(5):
  x = int(input()）
  y = -(-x//10)

### FIXED CODE ###

X=[int(input()) for i in range(5)]
Y=[]
for x in X:
  Y.append(-(-x//10)*10-x)
print(sum(X)+sum(Y)-(max(Y)))
import sys
sys.setrecursionlimit(10000)
a,b,c,d=list(input())
def solve(m,n):
    if eval(m)==7:
        print(m+"=7")
        exit(0)
    else:
        m[n]="-"
        solve(n,n+2)
solve(a+"+"+b+"+"+c+"+"+d,1)

### FIXED CODE ###

s=input()
op=["+","-"]
for i in range(2):
    for j in range(2):
        for k in range(2):
            formula=s[0]+op[i]+s[1]+op[j]+s[2]+op[k]+s[3]
            if eval(formula)==7:
                print(formula+"=7")
                exit(0)
# -*- coding:utf-8 -*-
import math
import sys

def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

n = int(input())
p = sieve(n)
arr = [0]*len(p)
n = math.factorial(n)

for i in range(len(p)):
    flag = 1
    k = p[i]
    while flag:
        if n%k == 0:
            k = k*p[i]
            arr[i] += 1
        else:
            flag = 0

x = 1
for i in range(len(arr)):
    if arr[i] != 0:
        x *= (arr[i]+1)
if ( n = 6):
    print(4)
else:
    print(x%(10**9+7))

### FIXED CODE ###

a,b,c,d = map(int,input().split())
s1 = a*b
s2 = c*d
if s1 >= s2:
    print(s1)
else:
    print(s2)
A,B,C=map(int,input().split())
if (A==B + B==C + C==A) =1:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

A,B,C=map(int,input().split())
if (A==B or B==C or C==A) and not(A==B and B==C and C==A):
  print("Yes")
else:
  print("No")
arrayNM = list(map(int, input().split()))
array = list(map(int, input().split()))
soutoku = 0
for num in array:
  soutoku += num
tokuhyousuu = soutokuku / (4 * float(array[1]))
ninnkiCounter = 0
for num in array:
  if (float(num) >= tokuhyousuu):
    ninnkiCounter += 1
    

if (arrayNM[1] <= ninnkiCounter):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

arrayNM = list(map(int, input().split()))
array = list(map(int, input().split()))
soutoku = 0
for num in array:
  soutoku += num
tokuhyousuu = soutoku / (4 * float(arrayNM[1]))
ninnkiCounter = 0
for num in array:
  if (float(num) >= tokuhyousuu):
    ninnkiCounter += 1
    

if (arrayNM[1] <= ninnkiCounter):
  print("Yes")
else:
  print("No")
A, B, K = map(int, input().split())
 
list=[]
list= [i for i in range(1,10) if A%i==0 and B%i==0]
list[K-1]

### FIXED CODE ###

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

list=[]
for i in range(1,10000):
    if (A%i==0 and B%i==0):
        list.append(i)
    else:
        continue

print(list[-K])