Harryxun/stf_run huggingface dataset:
import numpy as np

def main():
    N, X = map(int, input().split())
    x = np.asarray(list(map(int, input().split())))
    x = np.absolute(x - X)
    if N > 1:
        d = []
        for i in range(x.size-2):
            d.append(x[i+1] - x[i])
        d = np.absolute(np.asarray(list(set(d))))
    else:
        d = x
    m = np.min(d)

    for n in range(m, 0, -1):
        if d[d%n != 0].size == 0:
            print(n)
            return 0

if __name__ == '__main__':
    main()

### FIXED CODE ###


import numpy as np
import fractions

def main():
    N, X = map(int, input().split())
    x = np.asarray(list(map(int, input().split())))
    x = np.absolute(x - X)
    if N > 1:
        l = None
        for i, n in enumerate(x):
            if i == 0:
                l = n
            else:
                l = fractions.gcd(l, n)
        print(l)
    else:
        print(x[0])


if __name__ == '__main__':
    main()
l = list(map(int,input().split()))
 
s = l[0] + l[1]
if s % 2 = 1:
  s = s+ 1
else:
  None
  
print(s // 2)

### FIXED CODE ###

l = list(map(int,input().split()))
 
s = l[0] + l[1]
if s % 2 == 1:
    s = s+ 1
else:
    None
print(s // 2)
a = int(raw_input())
b = int(raw_input())
c = int(raw_input())

if a - b == b - c:
  print 'YES'
else:
  print 'NO'
  

### FIXED CODE ###

a,b,c = map(int,raw_input().split())

if a - b == b - c:
  print 'YES'
else:
  print 'NO'
R = int(input())
if R < 1200:
    ptint("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")


### FIXED CODE ###

R = int(input())
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")
n  = int(input())
red = []
red_x = []
blue = []
blue_y = []
for i in range(n):
    a, b = map(int,input().split())
    red.append([a,b])
    red_x.append(a)
    
for i in range(n):
    c, d = map(int,input().split())
    blue.append([c,d])
    blue_y.append(d)

count = 0    
for i in range(n):
    p = max(red_x)
    red_x.remove(p)
    s = min(blue_y)
    blue_y.remove(s)
    q = 0
    r = 0
    for j in range(n):
        if red[j][0] == p:
            q = red[j][1]
            red[j][0] = -1
            red[j][1] = -1
    for k in range(n):
        if blue[k][1] == s:
            r = blue[k][0]
            blue[k][0] = -1
            blue[k][1] = -1
            
    if p < r and q < s:
        count = count + 1 
    else:
        None
        
print(count)

### FIXED CODE ###

n = int(input())
red = []
blue = []

for i in range(n):
    a, b = map(int,input().split())
    red.append([a,b])
    

for i in range(n):
    c, d = map(int,input().split())
    blue.append([c,d])
    
red_sort = list(reversed(sorted(red, key=lambda y: y[1])))
blue_sort = sorted(blue, key=lambda x: x[0])

# print(red_sort)
# [[1, 3], [2, 0], [3, 1]]
# print(blue_sort)
# [[4, 2], [0, 4], [5, 5]]

pair = []
for blue_point in blue_sort:
    x_blue = blue_point[0]
    y_blue = blue_point[1]
    
    for red_point in red_sort:
        x_red = red_point[0]
        y_red = red_point[1]
        
        if x_red<x_blue and y_red<y_blue:
            if not (red_point in pair) and not (blue_point in pair):
                pair.append(red_point)
                pair.append(blue_point)
    
print(len(pair) // 2)
from collections import deque
A = deque(input())
while len(A) >= 2:
    if list(A)[-5:] == list("dream") or list("erase"):
        for _ in range(5):
            A.pop()
    elif list(A)[-6:] == list("eraser"):
        for _ in range(6):
            A.pop()
    elif list(A)[-7:] == list("dreamer"):
        for _ in range(7):
            A.pop()
    else:
        A = deque([0])
if len(A) == 0:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

s = input().replace("eraser", "").replace("erase", "")
s = s.replace("dreamer", "").replace("dream", "")
if s:
    print("NO")
else:
    print("YES")
while True:
    s = input()
    while len(s) != 1:
        _new = []
        for i in range(len(s)-1):
            t = str(int(s[i]) + int(s[i+1]))
            _new.append(t if len(t) == 1 else t[1])
        s = "".join(_new)
    print(s)

### FIXED CODE ###

while True:
    try:
        nums = input()
    except:
        break
    a = list(map(int, list(nums)))
    while len(a) > 1:
        a = [(a[i]+a[i+1])%10 for i in range(len(a)-1)]
    print(*a)
n,m=map(int,input().split())
p=[(i,1)for i in range(n)]
def find(i):
  if p[i][0]==i:return i
  else:
    c=find(p[i][0])
    p[i]=(c,0)
    return c
def union(i,j):
  pi=find(i)
  pj=find(j)
  if not pi==pj:
    if p[pi][1]>p[pj][1]:
      p[pi]=(pi,p[pi][1]+p[pj][1])
      p[pj]=(pi,0)
    else:
      p[pj]=(pj,p[pi][1]+p[pj][1])
      p[pi]=(pj,0)
      

for i in range(m):
  a,b=map(int,input().split())
  union(a,b)
ans=0
for i in range(n):
  if p[i][0]==i:ans=max(ans,p[i][1])
print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
p=[(i,1)for i in range(n)]
def find(i):
  if p[i][0]==i:return i
  else:
    c=find(p[i][0])
    p[i]=(c,0)
    return c
def union(i,j):
  pi=find(i)
  pj=find(j)
  if not pi==pj:
    if p[pi][1]>p[pj][1]:
      p[pi]=(pi,p[pi][1]+p[pj][1])
      p[pj]=(pi,0)
    else:
      p[pj]=(pj,p[pi][1]+p[pj][1])
      p[pi]=(pj,0)
      

for i in range(m):
  a,b=map(int,input().split())
  union(a-1,b-1)
ans=0
for i in range(n):
  if p[i][0]==i:ans=max(ans,p[i][1])
print(ans)
N = int(input())

ans = [0]*(N+1)
for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1, 101):
      n = x^2 + y^2 + z^2 + xy + yz + zx
      if n <= N:
        ans[n] += 1
        
for i in range(1,N):
  print(ans[i])

### FIXED CODE ###

N = int(input())

ans = [0]*(N+1)
for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1, 101):
      n = pow(x,2) + pow(y,2) + pow(z,2) + x*y + y*z + z*x
      if n <= N:
        ans[n] += 1
        
for i in range(1,N+1):
  print(ans[i])
s=input()
print('YES' if (len(s)>=7 and s[:3]=='key' and s[-4:]=='ence') or s[:7]=='keyence' or s[-7:]='keyence' else 'NO')

### FIXED CODE ###

s=input()
for i in range(len(s)):
	for j in range(i,len(s)+1):
		if s[:i]+s[j:]=='keyence':
			print('YES')
			break
	else:
		continue
	break
else:
	print('NO')
n = int(input())
import sys

a = 'abcdefghij'
s = 'a'
count = 0

if n == 1:
  print('a')
  sys.exit()

for i in range(2):
  s.append(a[i])
  if i == 0:
    count += 1
  if count == n - 1:
    print(s)
    break
  for j in range(i + 1):
    s.append(a[i])
    if i == 0:
      count += 1
    if count == n - 1:
      print(s)
      break
    for k in range(j + 1):
      s.append(a[i])
      if i == 0:
        count += 1
      if count == n - 1:
        print(s)
        break
      for l in range(k + 1):
        s.append(a[i])
        if i == 0:
          count += 1
        if count == n - 1:
          print(s)
          break
        for m in range(l + 1):
          s.append(a[i])
          if i == 0:
            count += 1
          if count == n - 1:
            print(s)
            break
          for o in range(m + 1):
            s.append(a[i])
            if i == 0:
              count += 1
            if count == n - 1:
              print(s)
              break
            for p in range(o + 1):
              s.append(a[i])
              if i == 0:
                count += 1
              if count == n - 1:
                print(s)
                break
              for q in range(p + 1):
                s.append(a[i])
                if i == 0:
                  count += 1
                if count == n - 1:
                  print(s)
                  break

### FIXED CODE ###

n = int(input())

def dfs(s):
  if len(s) == n:
    print(s)
  else:
    for i in range(ord(max(s)) - ord('a') + 2):
      dfs(s + chr(i + ord('a')))
      
s = 'a'
dfs(s)
N=int(input())

S=list(input())
m=0

a=S.count("R")
b=S.count("G")
c=S.count("B")

num=a*b*c

for i in range(N-2):
  for j in range(i+1,N):
    k=2*j-i
    if k>=n-1:
      break
    elif S[i]!=S[j]!=S[k]:
      m+=1
      
print(num-m)

### FIXED CODE ###

N=int(input())

S=list(input())
m=0

a=S.count("R")
b=S.count("G")
c=S.count("B")

num=a*b*c

for i in range(N-2):
  for j in range(i+1,N):
    k=2*j-i #削る条件
    if k>N-1:
      break
    elif S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
      m+=1
      
print(num-m)
import numpy as np

a, b, c = map(np.float64, input().split(" "))

if (np.sqrt(a) + np.sqrt(b)) < np.sqrt(c):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

v = [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]
k = int(input())
print(v[k-1])
def main():
    input_data = [input() for i in range(5)]
    k = int(input())

    input_data.sort()

    for i in input_data:
        temp = i - input_data[4]
        if temp > k :
            print(":(")
            break
        print('Yay!')

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    input_data = [int(input()) for i in range(5)]
    k = int(input())

    input_data.sort()
    input_data.reverse()

    temp = input_data[0] - input_data[4]
    if temp > k :
        print(":(")
    else:
        print('Yay!')

if __name__ == '__main__':
    main()
n=int(input())
a=list(map(int,input().split()))
b=[]
c=[]
ans=0
for i in range(n):
  b.append(i+1-a[i])
  c.append(a[i]+i+1)
c_=[0]*(max(c)+1)
b_=[0]*(max(c)+1)
for i in range(n):
  c_[c[i]]+=1
for i in range(n):
  if 0<=b[i]<=max(c)+1:
    b_[b[i]]+=1
for i in range(max(c)+1):
  ans+=b_[i]*c_[i]
print(ans)    

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=[]
c=[]
ans=0
for i in range(n):
  b.append(i+1-a[i])
  c.append(a[i]+i+1)
x=max(b)
if x<=0:
  print(0)
  exit()
else:
  ans=0
  b_=[0]*(x+1)
  for i in range(n):
    if 0<=b[i]<=x:
      b_[b[i]]+=1
  for i in range(n):
    if 0<=c[i]<=x:
      ans+=b_[c[i]]
  print(ans)
d=input()
a=list(map(int,input().split()))
rt=0
for i in a:
  if i % 2 == 1:
    pass
  else:
    if i%3==0 or i%5==0:
      rt=1
    else:
      rt=0
      print("DENIED")
      break
if rt==1:
  print("APPROVED")

### FIXED CODE ###

a=list(map(int,input().split()))
if(a[0]==a[1]==a[2]):
  print("No")
else:
  if (a[0]==a[1])|(a[1]==a[2])|(a[2]==a[0]):
    print("Yes")
  else:
    print("No")
A = list(input())
B = list(input())
C = list(input())
if condition:A[-1]=B[0]
    if condition:B[-1]=c[0]
        if condition:C[-1]=A[0]
            print("Yes")
        else:
            print("No")
    else:print("No")
        pass
else:
    print("No")

### FIXED CODE ###

A,B,C=(i for i in input().split())
if A[-1]==B[0] and B[-1]==C[0]:
    print("YES")
else:
    print("NO")
n,k = map(int,input().split())
l = list(map(int, input().split()))
freq = [0]*n+1
for i in l:
    freq[i]+=1
freq.sort()
vf = len(freq) - k if len(freq)> k else 0
print(sum(freq[:vf]))

### FIXED CODE ###

n,k = map(int,input().split())
l = list(map(int, input().split()))
freq = [0]*(n+1)
for i in l:
    freq[i]+=1
freq.sort()
vf = len(freq) - k if len(freq)> k else 0
print(sum(freq[:vf]))
N=int(input())
A=list(map(int,input().split()))

dict={}
dict[max(A)+1]=0
for a in A:
    if a in dict.keys():
        dict[a]+=1
    else:
        dict[a]=1
        if a+1 in dict.keys():
            dict[a+1]=0

print(dict[1])
for a in A:
    print(dict[a+1])
    dict[a+1]=0


### FIXED CODE ###

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

dict={}

for a in A:
    if a in dict.keys():
        dict[a]+=1
    else:
        dict[a]=1
dict[N]=0

for i in range(1,N+1):
    if i in dict.keys():
        print(dict[i])
    else:
        print(0)
# -*- coding: utf-8 -*-

N,W = map(int, input().split())
wN = []
vN = []
for i in range(N):
    w,v = map(int, input().split())
    wN.append(w)
    vN.append(v)

dp = [[0] * (3*(N-1)+1) for i in range(N+1)]

# 答えが明らかな範囲はDPに含めない
if W < wN[0]:
    print(0)
    exit()
elif W >= sum(wN):
    print(sum(vN))
    exit()

# wNの範囲はかなり限定されているので、オフセットを用意
# (-1するのは0地点を残すため)
offset = wN[0]-1
W -= offset

for i in range(N):
    for j in range(offset, 3*(N-1)+1 + offset):

        if wN[i] <= j:
            # max(0,～)で0未満を探しに行くのを避ける
            dp[i+1][j-offset] = max(dp[i][max(0,j-wN[i]-offset)] + vN[i], dp[i][j-offset])
        else:
            dp[i+1][j-offset] = dp[i][j-offset]

print(dp[N][W])

### FIXED CODE ###

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

"""
・メモ化再帰
"""

import sys
def input(): return sys.stdin.readline().strip()
sys.setrecursionlimit(10 ** 9)

from collections import defaultdict

N, W = map(int, input().split())
wN = [0] * N
vN = [0] * N
for i in range(N):
    wN[i], vN[i] = map(int, input().split())

# memo[i][j]: i番目以降の品物から重さの和がj以下なるように選んだときの価値の和の最大値
memo = [defaultdict(lambda: -1) for i in range(N+1)]

def dfs(cur, wei):
    # 既に調べた場所はそのまま返却
    if memo[cur][wei] != -1:
        return memo[cur][wei]
    # 品物を最後まで見た
    if cur == N:
        res = 0
    # まだ余力があるから両方試す
    elif wei >= wN[cur]:
        res = max(dfs(cur+1, wei-wN[cur]) + vN[cur], dfs(cur+1, wei))
    # もうこの回の荷物は入らない
    else:
        res = dfs(cur+1, wei)
    # ここまでのベストな値をメモに記録してから返却
    memo[cur][wei] = res
    return res
# 0番目以降で容量W以下の場合の結果を表示
print(dfs(0, W))
#a,b=map(int,input().split())
#p_3,p_4=map(int,input().split())
n=int(input())
#S=input()
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
h.reverse()
cnt=0
ans=[]
for i in range(n-1):
    if h[i]<=h[i+1]:
        cnt+=1
    else:
        ans.append(cnt)
        cnt=0
print(max(ans))

### FIXED CODE ###

#a,b=map(int,input().split())
#p_3,p_4=map(int,input().split())
n=int(input())
#S=input()
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
h.reverse()
cnt=0
ans=0
for i in range(1,n):
    if h[i-1]<=h[i]:
        cnt+=1
    else:
        cnt=0
    ans=max(ans,cnt)
print(ans)
N, W = map(int, input().split())
import numpy as np
dp = np.zeros(W, dtype=int)
for i in range(N):
    w, v = map(int, input().split())
    np.maximum(dp[:-w] + v, dp[w:], out=dp[w:])
print(dp.max())

### FIXED CODE ###

N, W = map(int, input().split())
import numpy as np
dp = np.zeros(W+1, dtype=int)
for i in range(N):
    w, v = map(int, input().split())
    np.maximum(dp[:-w] + v, dp[w:], out=dp[w:])
print(dp.max())
class UnionFind:
  def __init__(self, n):
    self.class = [i for i in range(n)]
    self.n = n
  def whichclass(self, x):
    if self.class[x]==x:
      return x
    else:
      self.class[x] = self.whichclass(self.class[x])
      return self.class[x]
  def union(self, x, y):
    cx = self.whichclass(x)
    cy = self.whichclass(y)
    if cx==cy:
      return
    minc = min(cx, cy)
    maxc = max(cx, cy)
    self.class[maxc] = minc
  def __getitem__(self, x):
    return self.whichclass(x)
  
N, M = map(int, input().split())
UF = UnionFind(N)
for i in range(M):
  a, b = map(int, input().split())
  a, b = a-1, b-1
  UF.union(a, b)
count = [0 for i in range(N)]
for i in range(N):
  count[UF[i]] = 1
print(sum(count)-1)

    

### FIXED CODE ###

class UnionFind:
  def __init__(self, n):
    self.g = [i for i in range(n)]
    self.n = n
  def whichclass(self, x):
    if self.g[x]==x:
      return x
    else:
      self.g[x] = self.whichclass(self.g[x])
      return self.g[x]
  def union(self, x, y):
    cx = self.whichclass(x)
    cy = self.whichclass(y)
    if cx==cy:
      return
    minc = min(cx, cy)
    maxc = max(cx, cy)
    self.g[maxc] = minc
  def __getitem__(self, x):
    return self.whichclass(x)
  
N, M = map(int, input().split())
UF = UnionFind(N)
for i in range(M):
  a, b = map(int, input().split())
  a, b = a-1, b-1
  UF.union(a, b)
count = [0 for i in range(N)]
for i in range(N):
  count[UF[i]] = 1
print(sum(count)-1)
N, A, B = [int(v) for v in input().strip().split(" ")]

pair = A + B
loop = (N // (A+B)) + 1
message = ''
for _ in range(loop):
    message += 'b' * A + 'r' * B
print(message[0:N].count('b'))

### FIXED CODE ###

N, A, B = [int(v) for v in input().strip().split(" ")]

loop, m = divmod(N, A + B)
print(loop * A + (m if m < A else A))
from scipy.sparse import*
from itertools import permutations as pm

n,m,h = map(int,input().split())
r = [int(i) for i in input().split()]

A = lil_matrix((n+1,n+1))
for i in range(m):
  u,v,l = map(int,input().split())
  A[u,v] = l

A=csgraph.shortest_path(A,method='D')

s=min(sum([A[i][j] for i,j in zip(a[:-1],a[1:])]) for a in pm(r))
print(int(s))

### FIXED CODE ###

from scipy.sparse import*
from itertools import permutations as pm

n,m,h = map(int,input().split())
r = [int(i) for i in input().split()]

u,v,l = zip(*[map(int,input().split()) for i in range(m)])

A=csgraph.dijkstra(csr_matrix((l,(u,v)),(n+1,n+1)),0)

s=min(sum(A[i][j] for i,j in zip(a[:-1],a[1:])) for a in pm(r))
print(int(s))
x1, y1, x2, y2 = map(int, input().split())

y3 = y2 + x2- x1
y4 = x2 - x1 + y1
x3 = y1 - y2 + x2
x4 = y1 - y2 + x1

print(x3, y3, x4, y4)


### FIXED CODE ###

K = int(input())
 
if K % 2 == 0:
  print(int(K/2*K/2))
else:
  print(int((K-1)*(K+1)/4))
def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    mod = 10**9+7
    ans = 1
    s, t = [i for i in a if i > 0], [j for j in a if j < 0]
    
    S, T = len(s), len(t)
    ok = False

    if S > 0:
        if n == k:
            ok = (T % 2 == 0)
        else:
            ok = True
    else:
        ok = (k % 2 == 0)

    if not ok:
        a.sort(key=abs)
        for i in range(k):
            ans *= a[i]
    else:
        s.sort()
        t.sort(reverse=True)
        if k % 2 == 1:
            ans *= s.pop()
        p = []
        while len(s) >= 2:
            x = s.pop()
            x *= s.pop()
            p.append(x)
        while len(t) >= 2:
            x = t.pop()
            x *= t.pop()
            p.append(x)
        p.sort(reverse=True)
        for i in range(k//2):
            ans *= p[i]
    print(ans % mod)


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    mod = 10**9+7
    ans = 1
    s, t = [], []
    for i in range(n):
        if a[i] < 0:
            t.append(a[i])
        else:
            s.append(a[i])
    # s, t = [i for i in a if i > 0], [j for j in a if j < 0]

    S, T = len(s), len(t)
    ok = False

    if S > 0:
        if n == k:
            ok = (T % 2 == 0)
        else:
            ok = True
    else:
        ok = (k % 2 == 0)

    if not ok:
        a.sort(key=abs)
        for i in range(k):
            ans *= a[i]
            ans %= mod
    else:
        s.sort()
        t.sort(reverse=True)
        if k % 2 == 1:
            ans *= s.pop()
            ans %= mod
        p = []
        while len(s) >= 2:
            x = s.pop()
            x *= s.pop()
            p.append(x)
        while len(t) >= 2:
            x = t.pop()
            x *= t.pop()
            p.append(x)
        p.sort(reverse=True)
        for i in range(k//2):
            ans *= p[i]
            ans %= mod
    print(ans % mod)


if __name__ == '__main__':
    main()
m = [int(l) for l in input()]
m.sort()
print(sort[-1])
print(sort[-2])
print(sort[-3])

### FIXED CODE ###

import sys
m = [int(l) for l in sys.stdin]
m.sort()
print(m[-1])
print(m[-2])
print(m[-3])
from collections import Counter
from math import factorial
n = int(input())
s = [list(input()) for _ in range(n)]

ss = []
for i in range(n):
    a = sorted(s[i])
    a = ''.join(a)
    ss.append(a)

ss = Counter(ss)
ans = 0
n = len(ss)
k = ss.keys()
for i in k:
    if ss[i] == 1:
        continue
    if ss[i] > 2:
        ans += factorial(ss[i]) / 2 / factorial(ss[i]-2)
    else:
        ans += 1
print(int(ans))

### FIXED CODE ###

from collections import Counter
from scipy import misc
n = int(input())
s = [list(input()) for _ in range(n)]

ss = []
for i in range(n):
    a = sorted(s[i])
    a = ''.join(a)
    ss.append(a)

ss = Counter(ss)
ans = 0
n = len(ss)
k = ss.keys()
for i in k:
    if ss[i] == 1:
        continue
    if ss[i] >= 2:
        ans += round(float(misc.comb(ss[i],2)))
print(int(ans))
N, D = input().split()
each = D*2 + 1 
print(-(-N // each))


### FIXED CODE ###

N, D = input().split()
each = int(D)*2 + 1 
print(-(-int(N) // each))
import sys
while True:
    x = sys.stdin.readline().strip()
    if x == "0 0":
        break
    a = list(map(int, x.strip()))
    sharp = "#" * a[1]
    for i in range(a[0]):
        print(sharp)
    print()

### FIXED CODE ###

while True:
    a = list(map(int, input().split()))
    if a[0] == a[1] == 0:
        break
    sharp = "#" * a[1]
    for i in range(a[0]):
        print(sharp)
    print()
if input() == 1:
    print('Hello World')
else:
    print(input() + input())

### FIXED CODE ###

if input() == '1':
    print('Hello World')
else:
    print(int(input()) + int(input()))
A,B,C,D,E,F = map(int,input().split())

a_limit = int(-(-F//(100*A)))
b_limit = int(-(-F//(100*B)))
c_limit = int(-(-F*E//(100*C)))
d_limit = int(-(-F*E//(100*D)))

water_cand = []
for i in range(a_limit):
  for j in range(b_limit):
    water_cand.append(100*A*i+100*B*j)

water_cand = [x for x in list(set(water_cand)) if 0<x<F]

sugar_cand = []
for i in range(c_limit):
  for j in range(d_limit):
    sugar_cand.append(C*i + D*j)

sugar_cand = list(set(sugar_cand))

max_dens = 0
total = 100*A
ans_sugar = 0
for i in water_cand:
  for j in sugar_cand:
    total = i + j
    dens = float(j)/total
    if total <= F and float(j)/i <= (E/100) and max_dens<dens:
      max_dens = dens
      ans_total = total
      ans_sugar = j
            
print(ans_total, ans_sugar)

### FIXED CODE ###

A,B,C,D,E,F = map(int,input().split())

a_limit = int(-(-F//(100*A)))
b_limit = int(-(-F//(100*B)))
c_limit = int(-(-F*E//(100*C)))
d_limit = int(-(-F*E//(100*D)))

water_cand = []
for i in range(a_limit):
  for j in range(b_limit):
    water_cand.append(100*A*i+100*B*j)

water_cand = [x for x in list(set(water_cand)) if 0<x<F]

sugar_cand = []
for i in range(c_limit):
  for j in range(d_limit):
    sugar_cand.append(C*i + D*j)

sugar_cand = list(set(sugar_cand))

max_dens = 0
ans_total = 100*A
ans_sugar = 0
for i in water_cand:
  for j in sugar_cand:
    total = i + j
    dens = float(j)/total
    if total <= F and float(j)/i <= (E/100) and max_dens<dens:
      max_dens = dens
      ans_total = total
      ans_sugar = j
            
print(ans_total, ans_sugar)
n = int(input())
count = 0
flag = False
for i in range(n):
    a, b = map(int, input().split())
    if a == b:
        if count == 2:
            flag = True
        else:
            count += 1
    else:
        count = 0
if flag:
    print(Yes)
else:
    print("No")

### FIXED CODE ###

n = int(input())
count = 0
flag = False
for i in range(n):
    a, b = map(int, input().split())
    if a == b:
        if count == 2:
            flag = True
        else:
            count += 1
    else:
        count = 0
if flag:
    print("Yes")
else:
    print("No")