Harryxun/stf_run huggingface dataset:
import math
N = int(input())
List = [int(i) for i in input().split()]

M = []
L = [0]*(N+1)
R = [0]*(N+1)
for i in range(1,N):
    L[i]=math.gcd(L[i-1],List[i])
    R[-i-1]=math.gcd(R[-i],List[-i+1])
for i in range(N):
    M.append(math.gcd(L[i],R[i+1]))
print(max(M))

### FIXED CODE ###

N = int(input())
List = [int(i) for i in input().split()]

def gcd(x,y):
    while y!=0:
        tmp = x
        x = y
        y = tmp%y
    return x

M = []
L = [0]*(N+1)
R = [0]*(N+1)
for i in range(1,N):
    L[i]=gcd(L[i-1],List[i])
    R[-i-1]=gcd(R[-i],List[-i+1])
for i in range(N):
    M.append(gcd(L[i],R[i+1]))
print(max(M))
# -*- coding: utf-8 -*-
N, X = map(int, input().split())
M = [int(input()) for _ in range(N)]
 
x = X - sum(M)
m = min(M)
 
print (N + x // m)

### FIXED CODE ###

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

option = input()
print (700 + 100 * option.count('o'))
N = int(input())
B = list(map(int, input().split()))

A = [0] * N


for i in range(N-1):
  A[i] = min(B[i-1],B[i])

A[0] = min(B[0],B[1])
A[N-1] = B[N-2]

print(A)

print(sum(A))

### FIXED CODE ###

N = int(input())
B = list(map(int, input().split()))

A = [0] * N


for i in range(N-1):
  A[i] = min(B[i-1],B[i])

A[0] = B[0]
A[N-1] = B[N-2]


print(sum(A))
n.k = map(int,input().split())
L = []
for val in rnage(n):
    L.append(val)

L = sorted(L)
ans_L = []
for i in range(n-k+1):
    ans = L[i+k-1] - L[i]
    ans_L.append(ans)
print(min(ans_L))

### FIXED CODE ###

n,k = map(int,input().split())
L = []
for val in range(n):
    val = int(input())
    L.append(val)

L = sorted(L)
ans_L = []
for i in range(n-k+1):
    ans = L[i+k-1] - L[i]
    ans_L.append(ans)
print(min(ans_L))
s = list(input())
def easy_step(s) :
    s_odd = s[::2]
    s_even = [1::2]
    if ("L" in s_odd) or ("R" in s_even) :
        print("No")
    else :
        print("Yes")
easy_step(s)

### FIXED CODE ###

def easy_step(s) :
    s_odd = s[::2]
    s_even = s[1::2]
    if ("L" in s_odd) or ("R" in s_even) :
        print("No")
    else :
        print("Yes")
s = list(input())
easy_step(s)
n, *p = map(int, open(0).read().split())
for i in range(2, n):
    t = p[i-2:i+1]
    c += sorted(t)[1] == t[1]
print(c)

### FIXED CODE ###

n, *p = map(int, open(0).read().split())
c = 0
for i in range(2, n):
    t = p[i-2:i+1]
    c += sorted(t)[1] == t[1]
print(c)
N = int(input())
A = [input() for i in range(N)]

D = {}
for row in A:
    order, key = row.split()
    if order[0] == "i":
        D[value] = 1
    else:
        if key in D.keys():
            print("yes")
        else:
            print("no")


### FIXED CODE ###

N = int(input())
A = [input() for i in range(N)]

D = {}
for row in A:
    order, key = row.split()
    if order[0] == "i":
        D[key] = 1
    else:
        if key in D.keys():
            print("yes")
        else:
            print("no")
[N,L] = [int(x) for x in input().split()]
A = {}
ANS = {}
count = 0
for i,x in enumerate(input().split()):
    i = int(i)
    x = int(x)
    if x in A : A[x] += [i]
    else : A[x] = [i]
for i in sorted(A) :
    for j in A[i] :
        for k in range(L) :
            if j + k not in ANS :
                ANS[j+k] = i
                count += 1
    if count > N + 2 : break
for i in range(L-1,N-1) : print(ANS[i], end=" ")
print(ANS[N-1])

### FIXED CODE ###

def ascend(a,b):
    mini = min(A[a:a+L])
    ans[a] = mini
    for i in range(a+1,b):
        if A[i+L-1] <= mini : mini = A[i+L-1]
        elif A[i-1] == mini : mini = min(A[i:i+L])
        ans[i] = mini

def descend(a,b):
    mini = min(A[b-1:b+L-1])
    ans[b-1] = mini
    for i in range(b-2,a-1,-1):
        if A[i] <= mini : mini = A[i]
        elif A[i+L] == mini: mini = min(A[i:i+L])
        ans[i] = mini
    
[N,L] = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
ans = [None]*(N-L+1)
count = 0;
if N > 10 ** 4:
    for i in range(100):
        if A[i+1] > A[i] : count += 1
    if count > 80 : descend(0, N-L+1)
    else : ascend(0,N-L+1)
else :
    ascend(0, N-L+1)
for i in ans[:-1] : print(i, end=" ")
print(ans[-1])
while True:
    a, op, b = (str, input().split())

    a = int(a)
    b = int(b)
    if op == "+":
        print(a +b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a / b)
    else op == "?":
        break

### FIXED CODE ###

while True:
    a, op, b = (input().split())
    x = int(a)
    y = int(b)
    if op == "?":
        break
    elif op == "-":
        print(x - y)
    elif op == "+":
        print(x + y)
    elif op =="*":
        print (x * y)
    elif op == "/":
        print (x // y)
A,B=input().spliy()
a=int(A)
b=int(B)
x=a+b
if x>10:
  print('error')
else:
  print(x)

### FIXED CODE ###

A,B=input().split()
a=int(A)
b=int(B)
x=a+b
if x>=10:
  print('error')
else:
  print(x)
n,m=int(input().split())
l=list(map(int,input().split()))
c=0
for i in l:
  if i>=m:
    c+=1
print(c)    
    


### FIXED CODE ###

n,m=list(map(int,input().split()))
l=list(map(int,input().split()))
c=0
for i in l:
  if i>=m:
    c+=1
print(c)
h,w,k=map(int, input().split())
board = [list(input()) for _ in range(h)]
ans=0
for paint_h in range(2**h):
  for paint_w in range(2**w):
    cnt=0
    for i in range(h):
      for j in range(w):
        if (paint_h>>i)&1==0 and (paint_w>>j)&1==0:
          if board[i][j]=='#':
            cnt+=1
    if cnk==l:
      ans += 1
print(ans)

### FIXED CODE ###

h,w,k=map(int, input().split())
board = [list(input()) for _ in range(h)]
ans=0
for paint_h in range(2**h):
  for paint_w in range(2**w):
    cnt=0
    for i in range(h):
      for j in range(w):
        if (paint_h>>i)&1==0 and (paint_w>>j)&1==0:
          if board[i][j]=='#':
            cnt+=1
    if cnt==k:
      ans += 1
print(ans)
a,b,k = map(int,input().split())
ans1 = a-k
if ans1 <= 0:
    ans2 = b - abs(ans1)
    if ans2 < 0:
        ans2 = 0
    ans1 = 0
    print(ans1, ans2)
else:
    print(ans1, ans2)

### FIXED CODE ###

a,b,k = map(int,input().split())
ans1 = a-k
if ans1 <= 0:
    ans2 = b - abs(ans1)
    if ans2 < 0:
        ans2 = 0
    ans1 = 0
    print(ans1, ans2)
else:
    print(ans1, b)
n = int(input())
s_counted = Counter(input())

for i in range(n - 1):
    si_counted = Counter(input())
    for j in s_counted:
        if j in si_counted:
            s_counted[j] = min(s_counted[j], si_counted[j])

        else:
            s_counted[j] = 0

ans = ""
for i in sorted(s_counted.most_common()):
    ans += i[1] * i[0]

print(ans)

### FIXED CODE ###

from collections import *

n = int(input())
s_counted = Counter(input())

for i in range(n - 1):
    si_counted = Counter(input())
    for j in s_counted:
        if j in si_counted:
            s_counted[j] = min(s_counted[j], si_counted[j])

        else:
            s_counted[j] = 0

ans = ""
for i in sorted(s_counted.most_common()):
    ans += i[1] * i[0]

print(ans)
num=int(input())
if num[:-1]==0 or num[:-1]==1 or num[:-1]==6 or num[:-1]==8:
  print("pon")
elis num[:-1]==3:
  print("bon")
else:
  print("hon")

### FIXED CODE ###

n = input()
if n[-1] == "3":
    print("bon")
elif n[-1] == "0" or n[-1] == "1" or n[-1] == "6" or n[-1] == '8':
    print("pon")
else:
    print("hon")
s = input()

res = []

for i in range(len(s)):
    for j in range(i, len(s)):
        check = s[i:j+1]
        if len(check) == check.count("A")+check.count("T")+check.count("C")+check.count("G"):
            res.append(len(check))
print(max(res))

### FIXED CODE ###

s = input()

res = []

for i in range(len(s)):
    for j in range(i, len(s)):
        check = s[i:j+1]
        if len(check) == check.count("A")+check.count("T")+check.count("C")+check.count("G"):
            res.append(len(check))
print(0 if res == [] else max(res))
A,B,C=map(int, iput().split())
if C>A && A+B>C:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

A,B,C=map(int, input().split())
if C>=A and A+B>=C:
    print("YES")
else:
    print("NO")
from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint
import bisect
import copy
import fractions
import itertools
import math
import queue
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers): return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers): return reduce(LCM, numbers)
def LCM(m, n): return (m * n // fractions.gcd(m, n))


n = II()
a = sorted(LI(), key=abs)
for i in range(n - 1):
    if abs(a[i]) == abs(a[i+1]) and a[i] > a[i+1]:
        hoge = a[i+1]
        a[i+1] = a[i]
        a[i] = hoge
# print(a)
newa = []
zerocnt = 0
for i in a:
    if i != 0:
        newa.append(i)
    else:
        zerocnt += 1
s = 0
ans = []
tmp = newa[0]
for i in range(n - 1 - zerocnt):
    if i == n - 2 - zerocnt:
        if tmp < newa[i+1]:
            ans.append((newa[i+1], tmp))
            tmp = newa[i+1] - tmp
            print(tmp)
        else:
            ans.append((tmp, newa[i+1]))
            tmp = tmp - newa[i+1]
            print(tmp)
    elif i == 0:
        tmp = newa[i] - newa[i+1]
        ans.append((newa[i], newa[i+1]))
    else:
        tmp = tmp - newa[i+1]
        ans.append((tmp, newa[i+1]))
for i in ans:
    print(str(i[0])+' '+str(i[1]))
for i in range(zerocnt):
    print(str(tmp)+' '+str(0))



### FIXED CODE ###

from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint
import bisect
import copy
import fractions
import itertools
import math
import queue
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers): return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers): return reduce(LCM, numbers)
def LCM(m, n): return (m * n // fractions.gcd(m, n))


n = II()
a = sorted(LI(), reverse=True)
ans = []
s = 0
if all([i < 0 for i in a]):
    tmp = a[0]
    for i in range(1, n):
        ans.append((tmp, a[i]))
        tmp -= a[i]
    print(tmp)
    for i in ans:
        print(i[0], i[1])
else:
    tmp = a[-1]
    for i in range(1, n - 1):
        if a[i] < 0:
            break
        ans.append((tmp, a[i]))
        tmp -= a[i]

    ans.append((max(a), tmp))
    tmp = max(a) - tmp

    for i in range(1, n - 1):
        if a[i] >= 0:
            continue
        ans.append((tmp, a[i]))
        tmp -= a[i]
    print(tmp)
    for i in ans:
        print(i[0], i[1])
#まずｎ団目までいく最短コストを探す。それはｎからｋ前までからのうち最短コストとなるもの
import sys #追加
sys.setrecursionlimit(2147483647)
def minJ(N,K,costL,memo):
    if N-1 in memo ==True:
        return memo[N-1]
    if N<K:
        return abs(costL[N-1]-costL[0])
    else:
        result=None
        for i in range(1,K+1):
            stock=minJ(N-i,K,costL,memo)+abs(costL[N-1]-costL[N-i-1])
            if result==None or (stock<result):
                result=stock
    memo[N-1]=result
    return result

memo={}
a,b=map(int, input().split())
costL=[]
try:
    costL.append(int(input()))
except:
    EOFError
print(minJ(a,b,costL,memo))


### FIXED CODE ###

import sys
sys.setrecursionlimit(400000000)
def main():
    n,k=map(int,input().split())
    h=tuple(map(int,input().split()))
    flog=[-1]*n
    for i in range(n):#dest=i 0が１
        if i<k+1:#0~k
            flog[i]=abs(h[i]-h[0])
        else:
            min=10**9
            for j in range(1,k+1):#1~k
                tmp=flog[i-j]+abs(h[i]-h[i-j])
                if tmp<min:
                    min=tmp
            flog[i]=min
    print(flog[n-1])
   # print(flog)
if __name__=="__main__":
    main()
n, k = map(int, input().split())
seq = [bool(int(c)) for c in input()]

ones = []
if seq[0] is False:
    ones.append(0)
zeros = []
state = True
cnt = 0
for i, c in enumerate(seq):
    if i == 0:
        state = c
        cnt = 1
        continue

    if c == state:
        cnt += 1
    else:
        if state:
            ones.append(cnt)
        else:
            zeros.append(cnt)
        cnt = 1
        state = c

if state is True:
    ones.append(cnt)
else:
    ones.append(0)
    zeros.append(cnt)

# print(ones)
# print(zeros)

n_zeros = len(zeros)

k = min(k, n_zeros)

cum_ones = []
for i, num in enumerate(ones):
    if i == 0:
        cum_ones.append(num)
        continue
    cum_ones.append(num + cum_ones[-1])
cum_zeros = []
for i, num in enumerate(zeros):
    if i == 0:
        cum_zeros.append(num)
        continue
    cum_zeros.append(num + cum_zeros[-1])

max_score = 0
for i in range(n_zeros - k + 1):
    score = 0
    score += (cum_ones[i+k] - cum_ones[i-1]) if i > 0 else cum_ones[i+k]
    score += (cum_zeros[i+k] - cum_zeros[i-1]) if i > 0 else cum_zeros[i+k]
    if max_score < score:
        max_score = score

print(max_score)

### FIXED CODE ###

n, k = map(int, input().split())
seq = [bool(int(c)) for c in input()]

ones = []
if seq[0] is False:
    ones.append(0)
zeros = []
state = True
cnt = 0
for i, c in enumerate(seq):
    if i == 0:
        state = c
        cnt = 1
        continue

    if c == state:
        cnt += 1
    else:
        if state:
            ones.append(cnt)
        else:
            zeros.append(cnt)
        cnt = 1
        state = c

if state is True:
    ones.append(cnt)
else:
    ones.append(0)
    zeros.append(cnt)

# print(ones)
# print(zeros)

n_zeros = len(zeros)

k = min(k, n_zeros)

cum_ones = []
for i, num in enumerate(ones):
    if i == 0:
        cum_ones.append(num)
        continue
    cum_ones.append(num + cum_ones[-1])
cum_zeros = []
for i, num in enumerate(zeros):
    if i == 0:
        cum_zeros.append(num)
        continue
    cum_zeros.append(num + cum_zeros[-1])

max_score = 0
for i in range(n_zeros - k + 1):
    score = 0
    score += (cum_ones[i+k] - cum_ones[i-1]) if i > 0 else cum_ones[i+k]
    if k > 0:
        score += (cum_zeros[i+k-1] - cum_zeros[i-1]) if i > 0 else cum_zeros[i+k-1]
    if max_score < score:
        max_score = score

print(max_score)
N,M,K = list(map(int,input().split()))

# DFSテンプレ、計算量=O(N+M)
# N:頂点の数
# M:辺の数

G = [[] for _ in range(N)]
# graphの入力
for _ in range(M):
    a,b = list(map(int,input().split()))
    G[a-1].append(b-1)
    G[b-1].append(a-1)
# print("G:",G)

KG = [[] for _ in range(N)]
# block graphの入力
for _ in range(K):
    a,b = list(map(int,input().split()))
    KG[a-1].append(b-1)
    KG[b-1].append(a-1)
# print("KG:",KG)

# ここまでエラーなし。

def dfs(G,v):
    # global l
    # nを訪問済みにする
    seen[v] = 1
    # l += 1
    # print(v+1)
    seenV.append(v)
    # vから行ける各頂点next_vについて
    for next_v in G[v]:
        if seen[next_v] == 1:
            continue
        else:
            dfs(G,next_v)

# Adj_size = [0]*N
# 全頂点を未訪問に初期化。
Adj = [[] for _ in range(N)]
seen = [0]*N
Y = []
for v in range(N):
    # l = 0
    if seen[v] == 0:
        # 未探索ならdfs発動
        seenV = []
        dfs(G,v)
        for sv in seenV:
            Adj[sv] = seenV
    
        # print("dfs done !!!")
    # print("v=",v+1,"seen:",seen)
    # print("l=",l)
    # print(seenV)
    
    
    
    # print("Adj[",v,"] :",Adj[v])
    
    # 出力
    # y = Adj_size[v] - len(G[v])-1
    y = len(Adj[v]) - len(G[v]) - 1
    for k in KG[v]:
        if k in Adj[v]:
            y += -1
    # print("v=",v+1,"y=",y)
    Y.append(str(y))

# print("ADj",Adj)
# print("Y",Y)
# print("G",G)

print(" ".join(Y))




### FIXED CODE ###

def find(x):
    if par[x]<0:
        return x
    else:
        par[x]=find(par[x])
        return par[x]
 
def unite(x,y):
  x,y=find(x),find(y)
  if x!=y:
    if x>y:
        x,y=y,x
    par[x]+=par[y]
    par[y]=x
    
def same(x,y):
  return find(x)==find(y)
 
def size(x):
  return-par[find(x)]
 
N,M,K = map(int,input().split())
par=[-1]*N
B = [set() for _ in range(N)]
FF = [0]*N
for _ in range(M):
    a,b = map(int,input().split())
    unite(a-1,b-1)
    FF[a-1] += 1
    FF[b-1] += 1
# print(F)
for j in range(K):
    a,b = map(int,input().split())
    B[a-1].add(b-1)
    B[b-1].add(a-1)

Y = []
for i in range(N):
    y = size(i) - FF[i] -1
    for b in B[i]:
        if same(i,b):
            y += -1
    Y.append(str(y))
print(" ".join(Y))
from collections import deque
import sys
sys.setrecursionlimit(10000)

def main():
    process_count, process_time, processes = get_input()
    result =  run_roundrobin(processes = processes, time = process_time)
    for r in result:
        print(r.name, r.time)


def run_roundrobin(processes, time, total_time = 0, result=[]):
    if not processes:
        return result

    p = processes.popleft()
    if p.time <= time:
        total_time += p.time
        p.time = total_time
        result.append(p)
    else:
        total_time += time
        p.time -= time
        processes.append(p)

    return run_roundrobin(processes, time, total_time, result)



def get_input():
    count, time = list(map(lambda x: int(x), input().split(' ')))

    processes = deque([])
    for _ in range(count):
        im = input().split(' ')
        p = Process(im[0], int(im[1]))
        processes.append(p)

    return count, time, processes


class Process():

    def __init__(self, name, time):
        self.name = name
        self.time = time


main()

### FIXED CODE ###

from collections import deque


def main():
    process_count, process_time, processes = get_input()
    result = run_roundrobin(processes=processes, time=process_time)
    for r in result:
        print(r.name, r.time)


def run_roundrobin(processes, time, total_time=0, result=[]):
    while processes:
        p = processes.popleft()
        if p.time <= time:
            total_time += p.time
            p.time = total_time
            result.append(p)
        else:
            total_time += time
            p.time -= time
            processes.append(p)

    return result


def get_input():
    count, time = list(map(lambda x: int(x), input().split(' ')))

    processes = deque([])
    for _ in range(count):
        im = input().split(' ')
        p = Process(im[0], int(im[1]))
        processes.append(p)

    return count, time, processes


class Process():

    def __init__(self, name, time):
        self.name = name
        self.time = time


main()
S=list(input())
q=int(input())
for i in range(q):
  c=list(input().split())
  print(c)
  if c[0]=='1':
    S.reverse()
  elif c[0]=='2':
    if c[1]=='1':
      S.appendleft(c[2])
    elif c[1]=='2':
      S.append(c[2])
ans=''.join(S)
print(ans)

### FIXED CODE ###

from collections import deque
S=deque(input())
q=int(input())
rev=False
for i in range(q):
  c=list(input().split())
  if c[0]=='1':
    rev=not rev
  elif c[1]=='1' and rev==False:
    S.appendleft(c[2])
  elif c[1]=='2' and rev==True:
    S.appendleft(c[2])
  else:
    S.append(c[2])
if rev:
  S.reverse()
ans=''.join(S)
print(ans)
N = int(input())
L = list(map(int, input().split()))
if N == 1:
  print(0)
else:
  x = 0
  for i in range(0,len(L)-1):
    if L[i] > L[i + 1]:
      x = x + (L[i] - L[i + 1])
      L[i + 1] = L[i + 1] + (L[i] - L[i + 1])
  print(x)
    



### FIXED CODE ###

N, X, T = map(int, input().split())
if N % X > 0:
  a = (N // X + 1) * T
else:
  a = (N // X) * T

print(a)
from math import gcd
from sys import stdin

for line in stdin:
    a,b = [int(i) for i in line.split()]
    g = gcd(a,b)
    print(g,int(a*b/g)

### FIXED CODE ###

from math import gcd
from sys import stdin

for line in stdin:
    a,b = [int(i) for i in line.split()]
    g = gcd(a,b)
    print(g,int(a*b/g))
import sys
from pprint import pprint

def solve(n, m, a, ops):
    a.sort()
    ops.sort(reverse=True)
    # pprint(a)
    # pprint(ops)
    start = 0
    for ope, count in ops:
        i = 0
        for a_i in xrange(start, start+count):
            if a[a_i] < ope and count > 0:
                count -= 1
                # print a_i, '=>', ope, ' count:', count
                a[a_i] = ope
                i += 1
            else:
                break
        start += i

    print sum(a)

if __name__ == '__main__':

    ops = []
    n, m = map(int, sys.stdin.readline().strip().split(" "))
    a = map(int, sys.stdin.readline().strip().split(" "))
    for _ in range(m):
        b, c = map(int, sys.stdin.readline().strip().split(" "))
        ops.append((c, b))

    solve(n, m, a, ops)

### FIXED CODE ###

import sys
from pprint import pprint

def solve(n, m, a, ops):
    a.sort()
    ops.sort(reverse=True)
    # pprint(a)
    # pprint(ops)
    start = 0
    for ope, count in ops:
        i = 0
        for a_i in xrange(start, start+count):
            if a_i >= n:
                break
            if a[a_i] < ope and count > 0:
                count -= 1
                # print a_i, '=>', ope, ' count:', count
                a[a_i] = ope
                i += 1
            else:
                break
        start += i

    print sum(a)

if __name__ == '__main__':

    ops = []
    n, m = map(int, sys.stdin.readline().strip().split(" "))
    a = map(int, sys.stdin.readline().strip().split(" "))
    for _ in range(m):
        b, c = map(int, sys.stdin.readline().strip().split(" "))
        ops.append((c, b))

    solve(n, m, a, ops)
def calendar(x):
    m, d = map(int, x.split())
    res = []
    for month in range(1, m + 1):
        for day in range(2, d + 1):
            for x in range(2, d + 1):
                if x * day == month:
                    temp = str(day) + str(x)
                    temp = int(temp)
                    if temp <= d:
                        res.append(temp)
    return len(res)


calendar()


### FIXED CODE ###

def calendar():
    m, d = map(int, input().split())
    res = []
 
    for month in range(1, m + 1):
        for day in range(2, 10):
            for x in range(2, 10):
                if x * day == month:
                    temp = str(day) + str(x)
                    temp = int(temp)
                    if temp <= d:
                        res.append(temp)
    return len(res)
 
 
print(calendar())
from collections import deque
n = int(input())
list = []
for i in range(n-1): #因数注意！
    M = input()    
    m = M.split()
    p = [int(i) for i in m] #1列の数列をリスト化
    p = p + [i]
    list.append(p) #list(行列)
color = [0 for i in range(n-1)] #各辺の色
maxcolor = 1
N = deque([[1,0]]) #頂点と使用されている色
delete = deque() #listから探索済みの辺を削除する
while len(list) != 0:
    a = N.popleft()
    b = 0
    for i, value in enumerate(list):
        if value[0] == a[0]:
            b = b + 1
            if b == a[1]:
                b = b + 1
            N.append([value[1],b])
            color[value[2]] = b
            delete.append(i)
            if maxcolor < b:
                maxcolor = b
        elif value[1] == a[0]:
            b = b + 1
            if b == a[1]:
                b = b + 1
            N.append([value[0],b])
            color[value[2]] = b
            delete.append(i)
            if maxcolor < b:
                maxcolor = b
    else:
        c = 0
        while len(delete) != 0:
            c = c + 1
            d = delete.popleft()
            del list[d-c+1]
print(maxcolor)
for i in color:
    print(i)

### FIXED CODE ###

n = input()
if n == "MON":
    print("6")
elif n == "TUE":
    print("5")
elif n == "WED":
    print("4")
elif n == "THU":
    print("3")
elif n == "FRI":
    print("2")
elif n == "SAT":
    print("1")
else:
    print("7")
s = str(input())
if s[2] == s[3] and s[4] = s[5]:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

s = str(input())
if s[2] == s[3] and s[4] == s[5]:
    print("Yes")
else:
    print("No")
a, b= [int(input()) for _ in range(2)]
import math
c=a*(10**int (math.log10(b) + 1))+b
if int(math.sqrt(c)) == math.sqrt(c):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

from math import sqrt
a, b = input().split()
n = int(a+b)
if(int(sqrt(n))**2 == n):
    print("Yes")
else:
    print("No")