Harryxun/stf_run huggingface dataset:
n = int(input())
k = (input())
if n>=10:
  print(k)
else:
  print(k-(100*(10-n))

### FIXED CODE ###

n,k = map(int,input().split())
if n >= 10:
    print(k)
else:
    print(k+(100*(10-n)))
lines = [input().split() for i in range(3)]

num = int(input())
bs = []
for i in range(num):
  bs.append(input())

hits = []
for i in bs:
  for row_index in range(len(lines)):
    for col_index in range(len(line)):
      if lines[row_index][col_index] == i:
        hits.append((row_index,col_index))
row_hits = (0,0,0)
col_hits = (0,0,0)
stride_hits = (0,0)

for hit in hits:
  r = hit[0]
  c = hit[1]
  row_hits[r]++
  col_hits[c]++
  if r == c:
    stride_hits[0]++
  else if (r,c) == (0,2) or (r,c) == (1,1) or (r,c) == (2,0) :
    stride_hits[1]++

if max(row_hits)>= 3 or max(col_hits)>=3 or max(stride_hits)>= 3:
  print 'Yes'
else:
  print 'No'
  

### FIXED CODE ###

lines = [input().split() for i in range(3)]
 
num = int(input())
bs = []
for i in range(num):
  bs.append(input())
 
hits = []
for i in bs:
  for row_index in range(len(lines)):
    for col_index in range(len(lines[row_index])):
      if lines[row_index][col_index] == i:
        hits.append((row_index,col_index))
row_hits = [0,0,0]
col_hits = [0,0,0]
stride_hits = [0,0]
 
for hit in hits:
  r = hit[0]
  c = hit[1]
  row_hits[r]+=1
  col_hits[c]+=1
  if r == c:
    stride_hits[0]+=1
  if (r,c) == (0,2) or (r,c) == (1,1) or (r,c) == (2,0) :
    stride_hits[1]+=1
 
if max(row_hits)>= 3 or max(col_hits)>=3 or max(stride_hits)>= 3:
  print ('Yes')
else:
  print ('No')
N = int(raw_input())
s = sorted([int(raw_input()) for i in range(N)])


_sum = sum(s)


def select_min(l):
    cand = min(l)
    if cand % 10 > 0:
        return cand
    return select_min([i for i in l if i != cand])


if _sum % 10 == 0:
    cand = filter(lambda x: x % 10 != 0, s)
    debt = select_min(cand)
    _sum -= debt

print(_sum)


### FIXED CODE ###

N = int(raw_input())
s = sorted([int(raw_input()) for i in range(N)])


_sum = sum(s)


def select_min(l):
    if len(l) == 0:
        return 0
    cand = min(l)
    if cand % 10 > 0:
        return cand
    return select_min([i for i in l if i != cand])


if _sum != 0 and _sum % 10 == 0:
    cand = filter(lambda x: x > 0 and x % 10 != 0, s)
    debt = select_min(cand)
    _sum -= debt

if _sum == 0 or _sum % 10 == 0:
    print(0)
else:
    print(_sum)
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

n = INT()
sp = [S_LIST() for _ in range(n)]
for i in range(n):
    sp[i][1] = float(1 / int(sp[i][1]))
    sp[i].append(i + 1)
sp.sort()
for i in range(n):
    print(sp[i][2])


### FIXED CODE ###

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

n = INT()
sp = [S_LIST() for _ in range(n)]
for i in range(n):
    sp[i][1] = float(1 / (int(sp[i][1]) + 1))
    sp[i].append(i + 1)
sp.sort()
for i in range(n):
    print(sp[i][2])
def solve():
    N = int(input())
    V = list(map(int,input().split()))
    C = list(map(int,input().split()))
    cnt=0
    for i in range(len(V)):
        if V < C:
            pass
        else:
            cnt += V(i)-C(i)
    print(cnt)


solve()


### FIXED CODE ###

def solve():
    N = int(input())
    V = list(map(int,input().split()))
    C = list(map(int,input().split()))
    cnt=0
    for i in range(len(V)):
        if V[i] < C[i]:
            pass
        else:
            cnt += V[i]-C[i]
    print(cnt)


solve()
#coding:utf-8
from scipy.special import perm, comb

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

ansN = comb(N,2,exact = True)
ansM = comb(M,2,exact = True)

ans = ansN + ansM

print(ans)


### FIXED CODE ###

#coding:utf-8
import itertools

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

ansN = len(list(itertools.combinations(range(N), 2)))
ansM = len(list(itertools.combinations(range(M), 2)))

ans = ansN + ansM
print(ans)
import fractions


def main():
    n, m = map(int, input().split())
    s = input()
    t = input()
    l =  n * m // fractions.gcd(n, m)
    x = [' '] * l
    for i in range(n):
        x[i * (l // n)] = s[i]
    for i in range(m):
        if x[i * (l // m)] == ' ':
            continue
        if x[i * (l // m)] != t[i]:
            print(-1)
            return
    print(l)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import fractions


def main():
    n, m = map(int, input().split())
    s = input()
    t = input()
    l = n * m // fractions.gcd(n, m)
    x = {}
    for i in range(n):
        x[i * (l // n)] = s[i]
    for i in range(m):
        if i * (l // m) not in x:
            continue
        if x[i * (l // m)] != t[i]:
            print(-1)
            return
    print(l)


if __name__ == '__main__':
    main()
n = int(input())
a = list(map(int, input().split()))

arr = []
for i in range(n):
    arr.append(a[i] - (i+1))

arr.sort()

ans = []

s = 0
b = arr[n//2]
for i in range(n):
    s += abs(a[i] - (b + (i+1)))
ans.append(s)

s = 0
b = arr[n//2 + 1]
for i in range(n):
    s += abs(a[i] - (b + (i+1)))
ans.append(s)

print(min(ans))

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))

arr = []
for i in range(n):
    arr.append(a[i] - (i+1))

arr.sort()

ans = []

s = 0
b = arr[n//2]
for i in range(n):
    s += abs(a[i] - (b + (i+1)))
ans.append(s)

if n == 1:
    print(ans[0])
    exit()
    
s = 0
b = arr[n//2 + 1]
for i in range(n):
    s += abs(a[i] - (b + (i+1)))
ans.append(s)

print(min(ans))
#include<iostream>
#include<algorithm>
#include <vector>
#include <cmath>
#include<string>
#define REP(i,n) for(int i=0;i<int (n);i++)
using namespace std;

int main(){
    int n;
    int ans=1;
    cin>>n;
    if (n<105){
        cout<<0<<endl;
        return 0;
    }
    for (int i=106;i<=n;i++){
        int cnt=0;
        for (int j=1;j<=i;j++){
            
            if (i %j ==0){
                cnt++;
            } 
        }
        if (cnt==8) ans++;
    }
    cout<<ans<<endl; 
    
    return 0;
}

### FIXED CODE ###

def I(): return int(input())
n = I()
ans = 0
if n>=105:
    for i in range(105,n+1,2):
        cnt=0
        for j in range(1,int(i**0.5)+1):
            if i % j ==0:
                if j*j==i:
                    cnt+=1
                else:
                    cnt+=2
        if cnt==8:
            ans+=1
print(ans)
inp = list(sorted([int(x) for x in input().split]))
print(inp[0]*inp[1]/2)

### FIXED CODE ###

inp = list(sorted([int(x) for x in input().split()]))
print((inp[0]*inp[1])//2)
n = int(input())
a = [int(i) for i in input().split()]
color = [0] * 8
any = 0
for i in a:
    if 1 <= i <= 399:
        color[0] = 1
    elif 400 <= i <= 799:
        color[1] = 1
    elif 800 <= i <= 1199:
        color[2] = 1
    elif 1200 <= i <= 1599:
        color[3] = 1
    elif 1600 <= i <= 1999:
        color[4] = 1
    elif 2000 <= i <= 2399:
        color[5] = 1
    elif 2400 <= i <= 2799:
        color[6] = 1
    elif 2800 <= i <= 3199:
        color[7] = 1
    else:
        any += 1
m = max(sum(color), 1)
M = min(sum(color) + any)
print(m, M)

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
color = [0] * 8
any = 0
for i in a:
    if 1 <= i <= 399:
        color[0] = 1
    elif 400 <= i <= 799:
        color[1] = 1
    elif 800 <= i <= 1199:
        color[2] = 1
    elif 1200 <= i <= 1599:
        color[3] = 1
    elif 1600 <= i <= 1999:
        color[4] = 1
    elif 2000 <= i <= 2399:
        color[5] = 1
    elif 2400 <= i <= 2799:
        color[6] = 1
    elif 2800 <= i <= 3199:
        color[7] = 1
    else:
        any += 1
m = max(sum(color), 1)
M = sum(color) + any
print(m, M)
n,m = map(int,input().split())
ac = [0]*m
wa = [0]*m
for i in range(m):
    p,s = input().split()
    p = int(p)
    if ac[p-1]:
        continue
    if s == 'AC':
        ac[p-1] = 1
    else:
        wa[p-1] += 1
count_ac = 0
count_wa = 0
for i in range(n):
    count_ac += ac[i]
    if ac[i]:
        count_wa += wa[i]
print(str(count_ac) + " " + str(count_wa))

### FIXED CODE ###

n,m = map(int,input().split())
ac = [0]*n
wa = [0]*n
for i in range(m):
    p,s = input().split()
    p = int(p)
    if ac[p-1]:
        continue
    if s == 'AC':
        ac[p-1] = 1
    else:
        wa[p-1] += 1
count_ac = 0
count_wa = 0
for i in range(n):
    count_ac += ac[i]
    if ac[i]:
        count_wa += wa[i]
print(str(count_ac) + " " + str(count_wa))
n = input()
      
S = range(1, 14)
H = range(1, 14)
C = range(1, 14)
D = range(1, 14)
      
for i in range(0, n):
   mk = raw_input()split()
   num = int, raw_input()split()
      if mk == 'S':
         S[num-1] = 0
      elif mk == 'H':
         H[num-1] = 0
      elif mk == 'C':
         C[num-1] = 0
      elif mk == 'D':
         D[num-1] = 0
      
for i in range(1, 13):
   if S[i] != 0:
      print 'S '+ str(S[i])
     
for i in range(0, 13):
   if S[i] != 0:
      print 'H '+ str(H[i])
     
for i in range(0, 13):
   if S[i] != 0:
      print 'C '+ str(C[i])
     
for i in range(0,13):
   if S[i] != 0:
      print 'D '+ str(D[i])

### FIXED CODE ###

n=input()
  
s=range(1,14)
h=range(1,14)
c=range(1,14)
d=range(1,14)
   
for i in range(n):
   m, k=raw_input().split()
   if m == 'S':
      s[int(k)-1] = 0
   elif m == 'H':
      h[int(k)-1] = 0
   elif m == 'C':
      c[int(k)-1] = 0
   elif m == 'D':
      d[int(k)-1] = 0
  
for i in range(0, 13):
   if s[i] != 0:
      print 'S '+str(s[i])
  
for i in range(0, 13):
   if h[i] != 0:
      print 'H '+str(h[i])
  
for i in range(0, 13):
   if c[i] != 0:
      print 'C '+str(c[i])
  
for i in range(0, 13):
   if d[i] != 0:
      print 'D '+str(d[i])
N = int(input())
a = []

for i in range(N):
    a,b = map(int,input().split())
    sa = b-a+1
    a.append(sa)
    
print(sum(a))

### FIXED CODE ###

N = int(input())
a = []

for i in range(N):
    x,b = map(int,input().split())
    sa = b-x+1
    a.append(sa)
    

print(sum(a))
n=int(input())
for i in range(n):
  a,b=map(int,input().split())
  if a==b:
    ct+=1
    if ct==3:
      print("Yes")
      break
  else:
    ct==0
else:
  print("No")

### FIXED CODE ###

n=int(input())
ct=0
for i in range(n):
  a,b=map(int,input().split())
  if a==b:
    ct+=1
    if ct==3:
      print("Yes")
      break
  else:
    ct=0
else:
  print("No")
s = input()
t = input()

ls=len(s)
lt=len(t)
if ls < lt:
    print(errorword)
else:
    for i in range(ls-lt,-1,-1):
        is_matched = True
        s_slice = slice(i, lt+2)

        for s_char, t_char in zip(s[s_slice], t):
            # 文字が不一致かつ？以外の場合は文字列不一致のためbreak
            if (s_char != t_char) and s_char != '?':
                is_matched = False
                break
                
        # ここまでbreakせずに来たら文字列一致のため文字列Sを出力
        if is_matched:
            temp_sl1 = slice(0, i)
            temp_sl2 = slice(i+lt, ls+1)
            out_str = '{}{}{}'.format(s[temp_sl1], t, s[temp_sl2])
            print(out_str.replace('?', 'a'))
            break
    
    if not is_matched:
        print(errorword)

### FIXED CODE ###

s = input()
t = input()
# s = 'c?????a'
# t = 'coder'
errorword = 'UNRESTORABLE'

ls=len(s)
lt=len(t)
if ls < lt:
    print(errorword)
else:
    for i in range(ls-lt,-1,-1):
        is_matched = True
        s_slice = slice(i, i+lt)

        for s_char, t_char in zip(s[s_slice], t):
            # 文字が不一致かつ？以外の場合は文字列不一致のためbreak
            if (s_char != t_char) and s_char != '?':
                is_matched = False
                break
                
        # ここまでbreakせずに来たら文字列一致のため文字列Sを出力
        if is_matched:
            temp_sl1 = slice(0, i)
            temp_sl2 = slice(i+lt, ls+1)
            out_str = '{}{}{}'.format(s[temp_sl1], t, s[temp_sl2])
            print(out_str.replace('?', 'a'))
            break
    
    if not is_matched:
        print(errorword)
N,M =map(int,input().split())
a = [0]*M
for i in range(M):
    a[i] = int(input())

ans = int(1)

A = [0]*(M+1)
A[0] = a[0]-1
A[M] = N - a[M-1]-1
for i in range(M-1):
    A[i+1] = a[i+1] - a[i]- 2
    if A[i+1]==-1:
        ans = 0

SA =[0]*N
SA[0] = int(1)
SA[1] = int(1)
for i in range(N-2):
    SA[i+2] = SA[i+1] + SA[i]
    SA[i+2] = SA[i+2]%1000000007

for i in range(M+1):
    ans *= SA[A[i]]
    ans = ans%1000000007


print(ans)


### FIXED CODE ###

def examC():
    N, M = LI()
    A = [I() for _ in range(M)]
    A.append(N+1)
    fib = [1]*(N+2)
    for i in range(1,N):
        fib[i+2] = fib[i+1] + fib[i]
    fib[0] = 0
#    print(fib)
    ans = fib[A[0]]%mod
    for i in range(M):
        ans *= fib[A[i+1]-A[i]-1]
        ans %=mod
    print(ans)
    return

def examD():
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,inf
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examC()
N = int(input())
for i in range(1, 10):
    if N % i == 0 and N / i <= 9:
        print('Yes')
        exit(1)
print('No')


### FIXED CODE ###

N = int(input())
flag = False
for i in range(1, 10):
    if N % i == 0 and int(N / i) <= 9:
        flag = True
        break

if flag:
    print('Yes')
else:
    print('No')
import sys
import collections
import sympy

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline

def main():
    N = int(input())
    A = [int(x) for x in input().split()]
    aset = list(set(A))
    aset.sort()

    past = set()
    ans = 0
    ansset = set()
    for a in aset:
        divs = sympy.divisors(a)
        for div in divs:
            if div in past:
                break
        else:
            ansset.add(a)
            ans += 1

        past.add(a)

    c = collections.Counter(A)
    for cc in c.most_common():
        if cc[1] == 1:
            break

        if cc[1] > 1 and cc[0] in ansset:
            ans -= 1

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import collections

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N = int(input())
    A = [int(x) for x in input().split()]
    aset = list(set(A))
    aset.sort()

    ans = [0] * (10 ** 6 + 1)

    for a in aset:
        for i in range(2, 10 ** 6 + 1):
            if a * i > 10 ** 6:
                break
            ans[a * i] += 1

    res = 0
    c = collections.Counter(A)
    for a in A:
        if ans[a] == 0 and c[a] == 1:
            res += 1

    print(res)



if __name__ == '__main__':
    main()
a = input()
b = input()
print(int(a) * int(b))

### FIXED CODE ###

a,b=(int(x) for x in input().split())
print(a * b)
n = int(input())
ans = 0
for i in range(1,n+1):
  if (len(i) % 2) != 0:
    ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1,n+1):
  num = str(i)
  if (len(num) % 2) != 0:
    ans += 1
print(ans)
from collections import Counter

N = int(input())
As = list(map(int, input().split()))
P = 10**9+7

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

lcm = As[0]*As[1]//gcd(As[0],As[1])
 
for i in range(2,N):
  c = gcd(lcm, As[i])
  lcm *= As[i]//c

### FIXED CODE ###

def pow_r(x, n, P):
  if n == 0:
    return 1
  if n % 2 == 0:
    return pow_r(x ** 2 % P, n // 2, P)
  else:
    return x * pow_r(x ** 2 % P, n // 2, P) 

from fractions import gcd

N = int(input())
As = list(map(int, input().split()))
P = 10**9+7

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

lcm = As[0]*As[1]//gcd(As[0],As[1])
 
for i in range(2,N):
  c = gcd(lcm, As[i])
  lcm *= As[i]//c

rlt = 0
for a in As:
  rlt += lcm*pow_r(a, P-2, P) % P
  rlt %= P
print(rlt)
N, M = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(N)]


import numpy as np
y = np.array(x)

y1 = np.copy(y)
y1[:, 0] = y1[:, 0] * -1

y2 = np.copy(y)
y2[:, 0] = y2[:, 0] * -1
y2[:, 1] = y2[:, 1] * -1

y3 = np.copy(y)
y3[:, 0] = y3[:, 0] * -1
y3[:, 1] = y3[:, 1] * -1
y3[:, 2] = y3[:, 2] * -1

y4 = np.copy(y)
y4[:, 1] = y4[:, 1] * -1

y5 = np.copy(y)
y5[:, 1] = y5[:, 1] * -1
y5[:, 2] = y5[:, 2] * -1

y6 = np.copy(y)
y6[:, 2] = y6[:, 2] * -1

y7 = np.copy(y)
y7[:, 0] = y7[:, 0] * -1
y7[:, 2] = y7[:, 2] * -1


print(np.max([np.sum(np.sort(np.sum(y, axis=1))[-1 * M:]),
             np.sum(np.sort(np.sum(y1, axis=1))[-1 * M:]),
             np.sum(np.sort(np.sum(y2, axis=1))[-1 * M:]),
             np.sum(np.sort(np.sum(y3, axis=1))[-1 * M:]),
             np.sum(np.sort(np.sum(y4, axis=1))[-1 * M:]),
             np.sum(np.sort(np.sum(y5, axis=1))[-1 * M:]),
             np.sum(np.sort(np.sum(y6, axis=1))[-1 * M:]),
             np.sum(np.sort(np.sum(y7, axis=1))[-1 * M:])]))


### FIXED CODE ###

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


import numpy as np
y = np.array(x)

y1 = np.copy(y)
y1[:, 0] = y1[:, 0] * -1

y2 = np.copy(y)
y2[:, 0] = y2[:, 0] * -1
y2[:, 1] = y2[:, 1] * -1

y3 = np.copy(y)
y3[:, 0] = y3[:, 0] * -1
y3[:, 1] = y3[:, 1] * -1
y3[:, 2] = y3[:, 2] * -1

y4 = np.copy(y)
y4[:, 1] = y4[:, 1] * -1

y5 = np.copy(y)
y5[:, 1] = y5[:, 1] * -1
y5[:, 2] = y5[:, 2] * -1

y6 = np.copy(y)
y6[:, 2] = y6[:, 2] * -1

y7 = np.copy(y)
y7[:, 0] = y7[:, 0] * -1
y7[:, 2] = y7[:, 2] * -1

if M != 0:
    print(np.max([np.sum(np.sort(np.sum(y, axis=1))[-1 * M:]),
                 np.sum(np.sort(np.sum(y1, axis=1))[-1 * M:]),
                 np.sum(np.sort(np.sum(y2, axis=1))[-1 * M:]),
                 np.sum(np.sort(np.sum(y3, axis=1))[-1 * M:]),
                 np.sum(np.sort(np.sum(y4, axis=1))[-1 * M:]),
                 np.sum(np.sort(np.sum(y5, axis=1))[-1 * M:]),
                 np.sum(np.sort(np.sum(y6, axis=1))[-1 * M:]),
                 np.sum(np.sort(np.sum(y7, axis=1))[-1 * M:])]))
else:
    print(0)
if "##" in S[A-1:C]:
	print("No")
elif "##" in S[B-1:D]:
	print("No")
elif D < C:	# A jumps over B
	if not "..." in S[B-2:D+1]:
		print("No")
	else:
		print("Yes")
else:
	print("Yes")

### FIXED CODE ###

N, A, B, C, D = map(int, input().split())
S = input()	# .#

if "##" in S[A-1:C]:
	print("No")
elif "##" in S[B-1:D]:
	print("No")
elif D < C:	# A jumps over B
	if not "..." in S[B-2:D+1]:
		print("No")
	else:
		print("Yes")
else:
	print("Yes")
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))

sq = np.diff(A)

ans = 1
flg = 0
prev = sq[0]
for i in range(1, len(sq)):
    if flg==1:
        prev = sq[i]
        flg = 0
        continue
    current = sq[i]
    if (prev * current) >= 0:
        continue
    else:
        ans += 1
        prev = current
        flg = 1

print(ans)

### FIXED CODE ###

import sys
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))

if N <= 2:
    print(1)
    sys.exit()

A = [A[0]] + [y for x,y in zip(A,A[1:]) if x != y]
sq = np.diff(A)

ans = 1
flg = 0
prev = sq[0]
for i in range(1, len(sq)):
    if flg==1:
        prev = sq[i]
        flg = 0
        continue
    current = sq[i]
    if (prev * current) > 0:
        continue
    else:
        ans += 1
        prev = current
        flg = 1

print(ans)
def solve(g):
    for i in range(1, h+1):
        for j in range(1, w+1):
            if g[i][j] == '#' and g[i][j+1] == '.' \
                    and g[i+1][j] == '.' and g[i][j-1] == '.' \
                    and g[i-1][j] == '.':
                        return False
    return True

h, w = list(map(int, input().split()))
g = [['.']*(w+2)]
g += [['.'] + list(input()) + ['.'] for i in range(h)]
g.append(['.']*(w+2))

if solve(g):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a, b = list(map(int, input().split()))
print(a if b >= a else a-1)
from collections import deque

H,W = map(int,input().split())
C_h,C_w = map(lambda x:int(x)-1,input().split())
D_h,D_w = map(lambda x:int(x)-1,input().split())
S = [input() for _ in range(H)]

INF = int(1e7)
dist = [[INF]*(W) for _ in range(H)]
dist[C_h][C_w] = 0
deq = deque()
deq.append((C_h,C_w))

move_a = [(1, 0), (0, 1), (-1, 0), (0, -1)]
move_b = [(-2, -2), (-2, -1), (-2, 0), (-2, 1), (-2, 2), (-1, -2), (-1, -1), (-1, 1), (-1, 2), (0, -2), (0, 2), (1, -2), (1, -1), (1, 1), (1, 2), (2, -2), (2, -1), (2, 0), (2, 1), (2, 2)]

while len(deq):
  h,w = deq.popleft()
  for dh,dw in move_a:
    nh,nw = h+dh,w+dw
    if (nh<0 or nw<0 or nh>=H or nw>=W) and S[nh][nW]!='#' and dist[nh][nw] > dist[h][w]:
      dist[nh][nw] = dist[h][w]
      deq.appendleft((nh,nw))
  for dh,dw in move_b:
    nh,nw = h+dh,w+dw
    if (nh<0 or nw<0 or nh>=H or nw>=W) and S[nh][nw] == '#' and dist[nh][nw] > dist[h][w]+1:
      dist[nh][nw] = dist[h][w]+1
      deq.append((nh,nw))

print(dist[D_h][D_w] if dist[D_h][D_w]<INF else -1)

### FIXED CODE ###

from collections import deque

H,W = map(int,input().split())
C_h,C_w = map(lambda x:int(x)-1,input().split())
D_h,D_w = map(lambda x:int(x)-1,input().split())
S = [input() for _ in range(H)]

INF = int(1e10)
dist = [[INF]*(W) for _ in range(H)]
deq = deque()
deq.append((C_h,C_w,0))

move_a = [(1,0),(0,1),(-1,0),(0,-1)]
move_b = [(i,j)for i in range(-2,2+1) for j in range(-2,2+1) if abs(i)+abs(j)>=2]

while len(deq):
  h,w,c = deq.popleft()
  if dist[h][w] <= c:
    continue
  dist[h][w] = c
  for dh,dw in move_a:
    nh,nw = h+dh,w+dw
    if nh<0 or nw<0 or nh>=H or nw>=W:
      continue
    if S[nh][nw] == '#':
      continue
    if dist[nh][nw] > c:
      deq.appendleft((nh,nw,c))
  for dh,dw in move_b:
    nh,nw = h+dh,w+dw
    if nh<0 or nw<0 or nh>=H or nw>=W:
      continue
    if S[nh][nw] == '#':
      continue
    if dist[nh][nw] > c+1:
      deq.append((nh,nw,c+1))
  
print(dist[D_h][D_w] if dist[D_h][D_w]<INF else -1)
h, w = map(int,input().split())
n = int(input())
a_l = list(map(int,input().split()))

ans = []
for _ in range(h):
    ans.append([0]*w)

direction = 0
posx = 0
posy = 0
for i in range(n):
    for j in range(a_l[i]):
        ans[posy][posx] = i+1
        if direction == 0:
            posx += 1
            if posx == w-1:
                direction = 1
        elif direction == 1:
            posy += 1
            direction = 2
        elif direction == 2:
            posx -= 1
            if posx == 0:
                direction = 3
        elif direction == 3:
            posy += 1
            direction = 0

for val in ans:
    print(' '.join(map(str,val)))






### FIXED CODE ###

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

ans = []
for _ in range(h):
    ans.append([0]*w)

direction = 0
posx = 0
posy = 0
for i in range(n):
    for j in range(a_l[i]):
        ans[posy][posx] = i+1
        if w == 1:
            direction = 1
        if direction == 0:
            posx += 1
            if posx == w-1:
                direction = 1
        elif direction == 1:
            posy += 1
            direction = 2
        elif direction == 2:
            posx -= 1
            if posx == 0:
                direction = 3
        elif direction == 3:
            posy += 1
            direction = 0

for val in ans:
    print(' '.join(map(str,val)))