Harryxun/stf_run huggingface dataset:
while True:
    H, W = map(int, raw_input().split())
    if H == W == 0:
        break
    for i in range(H):
        if W == 1 and i % 2 == 1:
            print "#"
        elif W == 1 abd i % 2 == 0:
            print "."
        elif i % 2 == 0:
            print "#." * (W / 2) + "#" * (W%2)
        else:
            print ".#" * (W / 2) + "." * (W%2)
    print



### FIXED CODE ###

while True:
    H, W = map(int, input().split())
    if H == W == 0:
       break
    for i in range(H):
       if i % 2 == 0:
           print("#."*(W//2) + "#"*(W%2))
       else:
           print(".#"*(W//2) + "."*(W%2))
    print()
cardArray = list(map(int,input().split()))

if cardArray[0]= carArray[1]:
  print("Draw")
elif cardArray[0] < cardArray[1]:
  if cardArray[0] == 1:
    print("Alice")
  else:
    print("Bob")
else:
  print("Bob")


### FIXED CODE ###

cardArray = list(map(int,input().split()))

if cardArray[0]== cardArray[1]:
  print("Draw")
elif cardArray[0] < cardArray[1]:
  if cardArray[0] == 1:
    print("Alice")
  else:
    print("Bob")
else:
  if cardArray[1] == 1:
    print("Bob")
  else:
    print("Alice")
from collections import deque
h, w = map(int, input().split())

maze = [list(input()) for _ in range(h)]
#print(maze)
ans = 0
def solve(sx, sy):
    reached = [[0 for _ in range(w)] for _ in range(h)]
    d = deque()
    d.append([sx, sy])
    dx = [-1, 0, 1, 0]
    dy = [0, 1, 0, -1]    
    while d:
        x, y = d.popleft()
        for i in range(4):
            next_y = y + dy[i]
            next_x = x + dx[i]
            if next_x < 0 or next_x > h - 1 or next_y < 0 or next_y > w - 1:
                continue
            if maze[next_x][next_y] == "#":
                continue
            if reached[next_x][next_y] != 0:
                continue
            d.append([next_x, next_y])
            reached[next_x][next_y] = reached[x][y] + 1
    return max(reached)

for i in range(h):
    for j in range(w):
        if maze[i][j] == ".":
            res = solve(i, j)
            ans = max(ans, res)
print(ans)

### FIXED CODE ###

from collections import deque
h, w = map(int, input().split())

maze = [list(input()) for _ in range(h)]
#print(maze)
ans = 0
def solve(sx, sy):
    INF = 1000000
    reached = [[INF for _ in range(w)] for _ in range(h)]
    reached[sx][sy] = 0
    d = deque()
    d.append([sx, sy])
    dx = [-1, 0, 1, 0]
    dy = [0, 1, 0, -1]    
    while d:
        x, y = d.popleft()
        for i in range(4):
            next_y = y + dy[i]
            next_x = x + dx[i]
            if next_x < 0 or next_x > h - 1 or next_y < 0 or next_y > w - 1:
                continue
            if maze[next_x][next_y] == "#":
                continue
            if reached[next_x][next_y] != INF:
                continue
            d.append([next_x, next_y])
            reached[next_x][next_y] = reached[x][y] + 1
    gl = 0
    for i in range(h):
        for j in range(w):
            if maze[i][j] == ".":
                gl = max(gl, reached[i][j])
    return gl

for i in range(h):
    for j in range(w):
        if maze[i][j] == ".":
            res = solve(i, j)
            ans = max(ans, res)
print(ans)
def main():
    import copy

    num, quantity = map(int, input().split())
    nums = list(map(int, input().split()))
    nums.sort()
    
    if quantity == 0:
        print(num)
        return
    
    i = 0

    minus_num = copy.copy(num)
    plus_num = copy.copy(num)

    while i < len(nums)
        if num not in nums:
            print(num)
            return
        
        if minus_num not in nums:
            print(minus_num)
            return
        
        if plus_num not in nums:
            print(plus_num)
            return
        
        minus_num = minus_num - 1
        plus_num = plus_num + 1
        i = i + 1

main()

### FIXED CODE ###

def main():
    import copy

    num, quantity = map(int, input().split())
    nums = list(map(int, input().split()))
    nums.sort()
    
    if quantity == 0:
        print(num)
        return
    
    i = 0

    minus_num = copy.copy(num)
    plus_num = copy.copy(num)

    while i < len(nums):
        if num not in nums:
            print(num)
            return
        
        if minus_num not in nums:
            print(minus_num)
            return
        
        if plus_num not in nums:
            print(plus_num)
            return
        
        minus_num = minus_num - 1
        plus_num = plus_num + 1

main()
n , k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10**9 + 7
a.sort(reverse=True)
ans = 1
plus = []
minus = []
zero = 0
for i in range(n):
    if a[i] > 0:
        plus.append(a[i])
    elif a[i] < 0:
        minus.append(a[i])
    elif a[i] == 0:
        zero += 1
if len(plus) + len(minus) < k:
    print(0)
elif len(minus) == 0:
    for i in range(k):
        ans *= plus[i]
        ans %= mod
    print(ans)
elif len(plus) == 0:
    if k % 2 == 0:
        for i in range(k):
            ans *= minus[n-1-i]
            ans %= mod
        print(ans)
    elif k % 2 == 1:
        if zero >= 1:
            print(0)
        elif zero == 0:
            for i in range(k):
                ans *= minus[i]
                ans %= mod
            print(ans)
else:
    if k % 2 == 1:
        ans = plus[0]
        del plus[0]
        k -= 1
    re = []
    for i in range(k//2):
        if 2*i + 1 >= len(plus):
            break
        re.append(plus[2*i]*plus[2*i+1])
    minus.sort()
    for i in range(k//2):
        if 2*i + 1 >= len(plus):
            break
        re.append(minus[2*i]*minus[2*i+1])
    re.sort(reverse=True)
    for i in range(k//2):
        ans *= re[i]
        ans %= mod
    print(ans)

### FIXED CODE ###

from collections import deque
n , k = map(int,input().split())
a = list(map(int,input().split()))
mod = 10**9 + 7
ans = 1
plus = []
minus = []

if n == k:
    for i in range(n):
        ans *= a[i]
        ans %= mod
    print(ans)
    exit()
    
for i in range(n):
    if a[i] >= 0:
        plus.append(a[i])
    elif a[i] < 0:
        minus.append(a[i])

if not plus and k % 2 == 1:
    minus.sort(reverse=True)
    for i in range(k):
        ans *= minus[i]
        ans %= mod
    print(ans)
    exit()

plus.sort(reverse=True)
minus.sort()
plus = deque(plus)
minus = deque(minus)

cou = []
while True:
    if len(cou) == k:
        break
    elif len(cou) == k-1:
        cou.append(plus.popleft())
        break
    else:
        if len(plus)>=2 and len(minus)>=2:
            p1 = plus.popleft()
            p2 = plus.popleft()
            m1 = minus.popleft()
            m2 = minus.popleft()
            if p1*p2 > m1*m2:
                cou.append(p1)
                plus.appendleft(p2)
                minus.appendleft(m2)
                minus.appendleft(m1)
            else:
                cou.append(m1)
                cou.append(m2)
                plus.appendleft(p2)
                plus.appendleft(p1)
        elif len(plus) < 2:
            m1 = minus.popleft()
            m2 = minus.popleft()
            cou.append(m1)
            cou.append(m2)
        elif len(minus) < 2:
            p1 = plus.popleft()
            cou.append(p1)

        
for i in cou:
    ans *= i
    ans %= mod
print(ans)
amount, length = map(int, input().split())
S = sorted([input() for a in range(amount)])
print(''.join(S))

### FIXED CODE ###

haiku_list = ['5', '7', '5']

str_input_list = input().rstrip().split(' ')

for a in range(3):
    if haiku_list[a] in str_input_list:
        str_input_list.remove(haiku_list[a])
        haiku_list[a] = '*'

if haiku_list == ['*', '*', '*']:
    print('YES')
else:
    print('NO')
n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort()
for i in range(k):
    a+=l[i]
print(l)


### FIXED CODE ###

n,k=map(int,input().split())
l=list(map(int,input().split()))
a=0
l.sort(reverse=True)
for i in range(k):
    a+=l[i]
print(a)
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)

n = int(input())
t = [0]*n
for i in range(n):
    t[i] = int(input())
    
ans = t[0]
    
for i in range(1,n):
    ans = int(ans * t[i] / gcd(ans , t[i]))
    
print(ans)

### FIXED CODE ###

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

n = int(input())
t = [0]*n
for i in range(n):
    t[i] = int(input())
    
ans = t[0]
    
for i in range(1,n):
    ans = ans * t[i] // gcd(ans , t[i])
    
print(ans)
n,m=map(int,input().split())
l=["p"]
i=0
while len(l)<x:
  i+=1
  l=["b"]+l+["p"]+l+["b"]
for j in range(n-i):
  l=["b"]+l
c=0
for i in range(x):
  if l[i]=="p":
    c+=1
print(c)

### FIXED CODE ###

n,x=map(int,input().split())
plist=[1]
blist=[1]
for i in range(n):
  plist.append(plist[-1]*2+1)
  blist.append(blist[-1]*2+3)
def patty(n,x):
  if n==0:
    return 1
  else:
    if x==1:
      return 0
    elif 1<x and x<=blist[n-1]+1:
      return patty(n-1,x-1)
    elif x==blist[n-1]+2:
      return plist[n-1]+1
    elif 2+blist[n-1]<x and 2*blist[n-1]+2>=x:
      return plist[n-1]+patty(n-1,x-2-blist[n-1])+1
    else:
      return plist[n]
print(patty(n,x))
N = int(input())
A = sorted(map(int, input().split()))
A[0] = 0
d = 0
for i in range(1, N+1):
    d += A[i] - A[i-1]
print(d)


### FIXED CODE ###

N = int(input())
A = sorted(map(int, input().split()))
d = 0
for i in range(1, N):
    d += A[i] - A[i-1]
print(d)
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
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 LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()

def main():
    N, Q = LI()
    events = []
    for _ in range(N):
        s, t, x = LI()
        s -= x
        t -= x
        events.append([s, x])
        events.append([t, -x])
    for _ in range(Q):
        d = II()
        events.append([d, INF])
    events.sort()
    dst = {}
    for t, x in events:
        if x == INF: # query
            y = min(dst) if len(dst) else -1
            print(y)
        elif x > 0: # add
            dst.add(x)
        else: # x < 0, delete
            dst.remove(-x)
    return

main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
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 LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()
from bisect import bisect_left

def main():
    N, Q = LI()
    XST = []
    for _ in range(N):
        s, t, x = LI()
        s -= x
        t -= x
        XST.append([x, s, t])
    D = []
    for _ in range(Q):
        D.append(II())
    ans = [-1] * Q
    nexts = [-1] * Q
    XST.sort()
    for x, s, t in XST:
        i = bisect_left(D, s)
        end = bisect_left(D, t)
        while i < end:
            if nexts[i] == -1:
                ans[i] = x
                nexts[i] = end
                i += 1
            else:
                i = nexts[i]
    for y in ans:
        print(y)
    return

main()
# 重複順列　19C10
from itertools import combinations_with_replacement as cw

n,m,q = map(int, input().split())
a_candidates = cw([i+1 for i in range(m)],m)
fs = [list(map(int, input().split())) for i in range(q)]

def calc(fs,As):
    cnt = 0
    for a,b,c,d in fs:
        if As[b]-As[a] == c: cnt += d
    return cnt

ans = 0
for As in list(a_candidates):
    ans = max(ans, calc(fs,As))

print(ans)

### FIXED CODE ###

# 重複順列　19C10
from itertools import combinations_with_replacement as cw

n,m,q = map(int, input().split())
a_candidates = cw([i+1 for i in range(m)],n)
fs = [list(map(int, input().split())) for i in range(q)]

def calc(fs,As):
    cnt = 0
    for a,b,c,d in fs:
        a -= 1
        b -= 1
        if As[b]-As[a] == c: cnt += d
    return cnt

ans = 0
for As in list(a_candidates):
    ans = max(ans, calc(fs,As))

print(ans)
a=input()
b=input()
c=input()
if b-a==c-b:
  print "YES"
else:
  print"NO"

### FIXED CODE ###

a,b,c=map(int,raw_input().split())
if b-a==c-b:
  print "YES"
else:
  print"NO"
N = int(input())
S, T  = input().split()

S_list = list(S)
T_list = list(T)
U_list = []
for i in range(N):
    U_list.append(S_list[i])
    U_list.append(T_list[i])

U = ''.join(U_list)
print(U)

### FIXED CODE ###

l1 = [1,2,3]
l2 = [int(input()) for i in range(2)]
ans = list(set(l1) - set(l2))
print(ans[0])
S = [n: list(input()) for n in "abc"]
i = "a"
while S[i]:
  i = S[i].pop(0)
  
print(i.upper())
     

### FIXED CODE ###

A = input()
B = input()
C = input()
n = A[0]
A = A[1:]
while True:
  if n == "a":
    if len(A) == 0:
      print("A")
      break
    n = A[0]
    A = A[1:]

  elif n == "b":
    if len(B) == 0:
      print("B") 
      break
    n = B[0]
    B = B[1:]
  else:
    if len(C) == 0:
      print("C")
      break
    n = C[0]
    C = C[1:]
N,M= map(int,input().split())

h = [int(i) for i in input().split()]
judge = [True]*N

for i in range (M):
    a,b= map(int,input().split())
    if h[a - 1] > h[b - 1]:
        judge[b-1] = False
    if h[a - 1] < h[b - 1]:
        judge[a - 1] = False
    if h[a - 1] == h[b - 1]:
        judge[b-1] = False
        judge[a - 1] = False

print(jadge.count(True))

### FIXED CODE ###

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

h = [int(i) for i in input().split()]
judge = [True]*N

for i in range (M):
    a,b= map(int,input().split())
    if h[a - 1] > h[b - 1]:
        judge[b-1] = False
    if h[a - 1] < h[b - 1]:
        judge[a - 1] = False
    if h[a - 1] == h[b - 1]:
        judge[b-1] = False
        judge[a - 1] = False

print(judge.count(True))
n = int(input())
cards = {}
for i in range(n):
  card = input()
  cards[card] = 1
  
for c in ['S','H','C','D']:
  for n in range(1,14):
    card = c + ' ' + str(n)
    if not key in cards:
      print(key)


### FIXED CODE ###

n = int(input())
cards = {}
for i in range(n):
  card = input()
  cards[card] = 1

for c in ['S', 'H', 'C', 'D']:
  for n in range(1,14):
    key = c + ' ' + str(n)
    if not key in cards:
      print(key)
import math as mt
A,B,N = map(int,input().split())
print(math.floor((A*N)/B)-A*math.floor(N/B)

### FIXED CODE ###

import math
A,B,N = map(int,input().split())
if B-1>N:
    print(math.floor((A*N)/B)-A*math.floor(N/B))
else:
    print(math.floor((A*(B-1))/B)-A*math.floor((B-1)/B))
n = int(input())
red  = [tuple(map(int, input().split())) for _ in range(n)]
blue = [tuple(map(int, input().split())) for _ in range(n)]
red.sort(key=lambda x:-x[1])
blue.sort()
count = 0
for xb, yb in blue:
    for xr, yr in red:
        if xb > xr and yb > yr:
            red[max_i] = (201, 201)
            count += 1
            break
print(count)

### FIXED CODE ###

n = int(input())
red  = [tuple(map(int, input().split())) for _ in range(n)]
blue = [tuple(map(int, input().split())) for _ in range(n)]

red.sort(key=lambda x:x[1])
blue.sort()

count = 0
for xb, yb in blue:
    max_y = -1
    max_i = -1
    for i in range(n):
        xr, yr = red[i]
        if xb > xr and yb > yr and max_y < yr:
            max_y, max_i = yr, i
    if max_y >= 0:
        red[max_i] = (201, 201)
        count += 1
print(count)
N=int(input())
A=[int(input()) for i in range(N)]
MAX1=max(A)
copyA=A.copy()
copyA.remove(MAX)
MAX2=max(copyA)
for i in A:
  if (i==MAX1):
    print(MAX2)
  else:
    print(MAX1)

### FIXED CODE ###

N=int(input())
A=[int(input()) for i in range(N)]
MAX1=max(A)
copyA=A.copy()
copyA.remove(MAX1)
MAX2=max(copyA)
for i in A:
  if (i==MAX1):
    print(MAX2)
  else:
    print(MAX1)
# -*- coding: utf-8 -*-
"""
Created on Sat May  9 16:33:03 2020

@author: shinba
"""


n = int(input())
a = list(map(input().split()))
cnt = 0
st = 1
for i in range(n):
    if a[i] == st:
        st += 1
    else:
        cnt += 1

if 1 in a:
    print(cnt)
else:
    print(-1)
    
    

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sat May  9 16:33:03 2020

@author: shinba
"""


n = int(input())
a = list(map(int,input().split()))
cnt = 0
st = 1
for i in range(n):
    if a[i] == st:
        st += 1
    else:
        cnt += 1

if 1 in a:
    print(cnt)
else:
    print(-1)
N,K = map(int,input().split())
S = list(input())

if len(S) == 1:
    print(1)
elif len(S) == 2:
    print(2)
elif S[0] == '0':
    LA = [0]
    LB = [0]
    for i in range(1,N-1):
        if (S[i] != S[i+1]) & (S[i] == '0'):
            LA.append(i+1)
        elif (S[i] != S[i+1]) & (S[i] == '1'):
            LB.append(i)
    LB.append(N-1)
    ANS = 0
    for i in range(len(LA)-K):
        J = LB[i+K]-LA[i]
        if J > ANS:
            ANS = J
    print(ANS)
else:
    LA = [0]
    LB = []
    for i in range(1,N-1):
        if (S[i] != S[i+1]) & (S[i] == '0'):
            LA.append(i+1)
        elif (S[i] != S[i+1]) & (S[i] == '1'):
            LB.append(i)
    LB.append(N-1)
    ANS = 0
    if K > len(LB)-1:
        print(len(S))
    else:
        for i in range(len(LA)-K):
            J = LB[i+K]-LA[i]+1
            if J > ANS:
                ANS = J
        print(ANS)

### FIXED CODE ###

N,K = map(int,input().split())
S = list(input())

if len(S) == 1:
    print(1)
elif len(S) == 2:
    print(2)
elif S[0] == '0':
    LA = [0]
    LB = [0]
    for i in range(0,N-1):
        if (S[i] != S[i+1]) & (S[i] == '0'):
            LA.append(i+1)
    for i in range(1,N-1):
        if (S[i] != S[i+1]) & (S[i] == '1'):
            LB.append(i)
    LB.append(N-1)
    ANS = 0
    if K >= len(LB)-1:
        print(N)
    else:
        for i in range(len(LB)-K):
            J = LB[i+K]-LA[i]+1
            if J > ANS:
                ANS = J
        print(ANS)
else:
    LA = [0]
    LB = []
    for i in range(0,N-1):
        if (S[i] != S[i+1]) & (S[i] == '0'):
            LA.append(i+1)
        elif (S[i] != S[i+1]) & (S[i] == '1'):
            LB.append(i)
    LB.append(N-1)
    ANS = 0
    if K >= len(LB)-1:
        print(N)
    else:
        for i in range(len(LB)-K):
            J = LB[i+K]-LA[i]+1
            if J > ANS:
                ANS = J
        print(ANS)
from collections import defaultdict
import sys
input = sys.stdin.readline

N, M = map(int, input().split())
G = [[] for _ in range(N+1)]
for _ in range(M):
    A, B = map(int, input().split())
    G[A].append(B)

def dfs(v, o):
    if len(parents[v]) > 1:
        return []
    for c in G[v]:
        parents[c].add(v)

    ancestors.add(v)
    for c in G[v]:
        if c in ancestors - {o}:
            ancestors.remove(v)
            return []

    ret = []
    if any(c == o for c in G[v]):
        ret = [v]
    else:
        for c in G[v]:
            ret = dfs(c, o)
            if ret:
                ret.append(v)
                break

    ancestors.remove(v)
    for c in G[v]:
        parents[c].remove(v)
    return ret

for v in range(1, N+1):
    ancestors = set()
    parents = defaultdict(set)
    cand = dfs(v, v)
    if cand:
        print(len(cand))
        print(*cand, sep='\n')
        break
else:
    print(-1)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**5)

N, M = map(int, input().split())
G = [[] for _ in range(N+1)]
for _ in range(M):
    A, B = map(int, input().split())
    G[A].append(B)

def dfs(v, o):
    for c in G[v]:
        if c == o:
            return [v]
    for c in G[v]:
        if visited[c]:
            continue
        visited[c] = True
        ret = dfs(c, o)
        if ret:
            return [v] + ret

for v in range(1, N+1):
    visited = [False] * (N+1)
    cur = dfs(v, v)
    if cur:
        break
else:
    print(-1)
    exit()

while True:
    cur_set = set(cur)
    unused = None
    for i in range(len(cur)):
        u, v = cur[i], cur[(i+1) % len(cur)]
        for c in G[u]:
            if c == v:
                continue
            elif c in cur_set:
                unused = (i, cur.index(c))
                break

    if not unused:
        break
    else:
        t, s = unused
        nxt = []
        i = s
        while i != t:
            nxt.append(cur[i])
            i = (i + 1) % len(cur)
        nxt.append(cur[t])
        cur = nxt

print(len(cur))
print(*cur, sep='\n')
import sys

def input():
    return sys.stdin.readline().strip()

def main():
    K = int(input())
    S = input()

    mod = 10 ** 9 + 7
    n = len(S)
    ans = 0

    fact =[1]*(K+n)
    factinv = [1]*(K+n)


    for i in range(2,K+n):
        fact[i] = (fact[i-1] * i) % mod
        factinv[i] = pow(fact[i],mod-2,mod)

    def nCr(n,r):
        return (fact[n] * factinv[r] * factinv[n-r]) % mod

    for i in range(K+1):
        #ans += ((25 ** i * nCr(i+n-1,n-1)) * (26 ** (K - i))) % mod
        ans += ((25 ** i * fact[i+n-1] * factinv[n-1] * factinv[i] ) * (26 ** (K - i))) % mod
    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

a = input()

if a.isupper():
    print('A')
else:
    print('a')
import math
n=int(input())
l=[int(input()) for i in range(6)]
print(math.ceil(n/min(l)+4)


### FIXED CODE ###

import math
n=int(input())
l=[int(input()) for i in range(5)]
print(math.ceil(n/min(l))+4)
H, W = map(int, input().split())
s = [input() for _ in range(H)]
#print(s)

f1 = True
for i in range(H):
  if not f1:
    break
  for j in range(W):
    if not f1:
      break
    if s[i][j] == '.':
      continue
    f = False
    if i >= 1 and s[i-1][j] == '#':
      f = True
    if j <= W-2 and s[i][j+1] == '#':
      f = True
    if i <= H-2 and s[i+1][j] == '#':
      f = True
    if j >= 1 and s[i][j-1] == '#':
      f = True
    if not f:
      f1 = False

#print(s)
if f:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

H, W = map(int, input().split())
s = [input() for _ in range(H)]
#print(s)

f1 = True
for i in range(H):
  if not f1:
    break
  for j in range(W):
    if not f1:
      break
    if s[i][j] == '.':
      continue
    f = False
    if i >= 1 and s[i-1][j] == '#':
      f = True
    if j <= W-2 and s[i][j+1] == '#':
      f = True
    if i <= H-2 and s[i+1][j] == '#':
      f = True
    if j >= 1 and s[i][j-1] == '#':
      f = True
    if not f:
      f1 = False

#print(s)
if f1:
  print('Yes')
else:
  print('No')
S = input()
T = input()

if(S==T[0:len(S)]):
  print(True)
 else:
    print(False)
	



### FIXED CODE ###

S = input()
T = input()

if(S==T[0:len(S)]):
  print('Yes')
else:
    print('No')
cnt = 0
n = int(input())
p = list(map(int, input().split())
for i in range(1, n + 1):
  if int(i) != p[i - 1] :
    cnt += 1
    if cnt >= 2:
      break
if cnt <= 1 :
  print("YES")
else :
   print("NO")


### FIXED CODE ###

cnt = 0
n = int(input())
p = list(map(int, input().split()))
for i in range(1, n + 1):
  if int(i) != p[i - 1] :
    cnt += 1
    if cnt >= 3:
      break
if cnt <= 2 :
  print("YES")
else :
   print("NO")
import math

n, a, b = map(int, input().split())
v = list(map(int, input().split()))
v.sort(reverse=True)

n1 = v.count(v[a - 1])
n2 = v[:a].count(v[:a][a - 1])

print(sum(v[:a]) / a)
if len(set(v[:a])) != 1:
	print(int(math.factorial(n1) / (math.factorial(n2) * math.factorial(n1 - n2))))
else:
	ans = 0
	for i in range(a, b + 1):
		ans += int(math.factorial(n1) / (math.factorial(i) * math.factorial(n1 - i)))
	print(ans)

### FIXED CODE ###

from math import factorial

n, a, b = map(int, input().split())
v = list(map(int, input().split()))
v.sort(reverse=True)

n1 = v.count(v[a - 1])
n2 = v[:a].count(v[:a][a - 1])

print(sum(v[:a]) / a)
if len(set(v[:a])) != 1:
	if n1 == n2:
		print(1)
	else:
		print(int(factorial(n1) / (factorial(n2) * factorial(n1 - n2))))
else:
	ans = 0
	if n1 == 1:
		print(1)
	else:
		for i in range(a, min(n1 + 1, b + 1)):
			ans += int(factorial(n1) / (factorial(i) * factorial(n1 - i)))
		print(int(ans))