Harryxun/stf_run huggingface dataset:
a=input()
c=False
f=False
for i in range(len(a)):
  if c==True:
    if a[i]=='F':
    f=True
  else:
    if a[i]=='C':
    c=True
if c==True and f==True:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a=input()
c=False
f=False
for i in range(len(a)):
    if c==True:
        if a[i]=='F':
            f=True
    else:
        if a[i]=='C':
            c=True
if c==True and f==True:
    print("Yes")
else:
    print("No")
a,b,c = input().split()
print(upper(a[0])+upper(b[0])+upper(c[0]))

### FIXED CODE ###

a,b,c = input().split()
print(a[0].upper()+b[0].upper()+c[0].upper())
rainy_days = input()
if rainy_days = 'RRR':
    print(3)
elif rainy_days == 'RRS' or 'SRR':
    print(2)
elif rainy_days == 'RSR' or 'RSS' or 'SSR' or 'SRS':
    print(1)
else rainy_days == 'SSS':
    print(0)

### FIXED CODE ###

r = input()
if r == 'RRR':
    print(3)
elif r == 'RRS' or r == 'SRR':
    print(2)
elif r == 'RSR' or r == 'RSS' or r =='SSR' or r =='SRS':
    print(1)
elif r == 'SSS':
    print(0)
n = int(input())
ls = sorted(list(map(int, input().split())))
primes = [0] * (max(ls) + 1)
primes[0] == 1
primes[1] == 1
for i in range(round(n ** 0.5) + 1):
    if primes[ls[i]] == 0:
        for j in range(ls[i] * 2, max(ls) + 1, ls[i]):
            primes[j] = 1

count = 0
for i in ls:
    if primes[i] == 0:
        count += 1
print(count)


### FIXED CODE ###

n = int(input())
ls = sorted(list(map(int, input().split())))
dp = [0] * (ls[-1] + 1)
for i in ls:
    dp[i] += 1
    if dp[i] == 1:
        for j in range(i*2, ls[-1] + 1, i):
            dp[j] += 2

print(dp.count(1))
a,b = map(int,raw_input().split())
print(max(a+b,a-b,a*b))

### FIXED CODE ###

a,b = map(int,input().split())
print(max(a+b,a-b,a*b))
a, b = int(input().split());
r = a * b;
if (r % 2 == 0):
  print(Even);
else:
  print(Odd);

### FIXED CODE ###

a, b = map(int,input().split())
r = a * b
if (r % 2 == 0):
  print("Even");
else:
  print("Odd");
from scipy.special import perm, comb
N,M=list(map(int,input().split()))
A=[int(input()) for i in range(M)]
A.append(N)
if not 1 in A:
    A.append(0)
    A.sort()
count=1
for m in range(len(A)-1):

    count*=sum([comb((A[m+1]-1)-A[m]-i,i,exact=True) for i in range((A[m+1]-1)-A[m])])
    print(sum([comb((A[m+1]-1)-A[m]-i,i,exact=True) for i in range((A[m+1]-1)-A[m])]),count)
print(count%1000000007)


### FIXED CODE ###

N,M=map(int,input().split())
mod=10**9+7
A=set([int(input()) for i in range(M)])

data=[0 for i in range(N)]
if 1 not in A:
    data[0]=1
if N>=2:
    if 2 not in A:
        data[1]=1+data[0]


for i in range(2,N):
    if i+1 not in A:
        data[i]=data[i-1]+data[i-2]
        data[i]%=mod

#print(data)

print(data[-1])
def dp(i,k):
    if k<=0:
        return 0
    tmp=N-i
    if k>(tmp//2)+(tmp%2):
        return -float('inf')
    return max(A[i]+dp(i+2,k-1),dp(i+1,k))

N=int(input())
A=[int(_) for _ in input().split()]
print(dp(0,N//2))


### FIXED CODE ###

def main():
    N=int(input())
    A=[int(_) for _ in input().split()]
    dp=[[0,0,0] for _ in range(N//2+1)]
    for i in range(N//2):
        dp[i+1][0]=dp[i][0]+A[i*2]
        dp[i+1][1]=max(dp[i][1],dp[i][0])+A[i*2+1]
        if N%2:
            dp[i+1][2]=max(dp[i][2],dp[i][1],dp[i][0])+A[i*2+2]
    if N%2:
        print(max(dp[-1]))
    else:
        print(max(dp[-1][:2]))

main()
x1,y1=0,0
x2,y2=10**9,1
y3 = n//x2 +1
if y3>x2:
    y3=x2
x3 = y3*x2 - n


output=[x1,y1,x2,y2,x3,y3]
output=list(map(str,output))
    
print(" ".join(output))

### FIXED CODE ###

import math
n=int(input())
x1,y1=0,0
x2,y2=10**9,1
y3 = n//x2 +1
if y3>x2:
    y3=x2
x3 = y3*x2 - n


output=[x1,y1,x2,y2,x3,y3]
output=list(map(str,output))
    
print(" ".join(output))
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

h,w,k = na()
s = []
for i in range(h):
    s.append(list(ns()))

ans = []
k = 1
for i in range(h):
    if '#' in s[i]:
        ret = []
        for j in range(w):
            if j != 0 and s[i][j] == '#':
                k+=1
            ret.append(k)
        ans.append(ret)
        k+=1
    else:
        ans.append(ans[-1])

for i in ans:
    print(*i,sep=' ')

### FIXED CODE ###

import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

h,w,K = na()
s = []
for i in range(h):
    s.append(list(ns()))

ans = []
k = 1
bb = 0

for i in range(h):
    if '#' in s[i]:
        ret = []
        flag = True
        for j in range(w):
            if s[i][j] == '#':
                if flag:
                    flag = False
                else:
                    k+=1
            ret.append(k)
        ans.append(ret)
        k+=1
        if bb:
            for _ in range(bb):
                ans.append(ans[-1])
            bb = 0
    else:
        if len(ans) == 0:
            bb += 1
            continue
        ans.append(ans[-1])


for i in ans:
    print(*i,sep=' ')
if a*b % 2 == 0:
  return 'Even'
else:
  return 'Odd'

### FIXED CODE ###

a,b=map(int,input().split())
print('Even' if a*b%2==0 else 'Odd')
S=list(input())
s=0 #取り除いたキューブの数
i=0 
while len(set(S))!=len(S):
  if S[i]==S{i+1]==0 or S{i]==S[i+1]==1:
    s=s
    i+=1
  else:
    s+=2
    del S[i:i+2]
    i=0
print(s)

### FIXED CODE ###

S=input()
N=len(S)
a=S.count('0')
b=S.count('1')
t=min(a,b)
print(2*t)
from collections import defaultdict
dic = defaultdict(list)
inf = 10**6
N = int(input())
l = []
z = []
xma, xmi, yma, ymi = 0, inf, 0, inf
for _ in range(N):
    x, y = map(int, input().split())
    xma = max(xma, x)
    yma = max(yma, y)
    xmi = min(xmi, x)
    ymi = min(ymi, y)
    l.append([x, y])
    z.append(x+y)
z.sort()
ans = z[-1]-z[0]

for t in l:
    a = t[0]+t[1]
    dic[a].append(t)
for u in dic:
    dic[u].sort()
    b = dic[u][-1][0]-dic[u][0][0]
    ans = max(2*b,ans)
    
l1, l2, l3, l4 = [], [], [], []
for k in l:
    if k[0]==xma:
        l1.append([k[1], k[0]])
    elif k[1]==yma:
        l2.append([k[0], k[1]])
    elif k[0]==xmi:
        l3.append([k[1], k[0]])
    elif k[1]==ymi:
        l4.append([k[0], k[1]])
l1.sort()
l2.sort()
l3.sort()
l4.sort()
print(xma, xmi, yma, ymi)
print(l1, l2, l3, l4)
ans = max(ans, abs(l1[0][1]-l3[-1][1])+abs(l1[0][0]-l3[-1][0]))
ans = max(ans, abs(l1[-1][1]-l3[0][1])+abs(l1[-1][0]-l3[0][0]))
ans = max(ans, abs(l2[0][1]-l4[-1][1])+abs(l2[0][0]-l4[-1][0]))
ans = max(ans, abs(l2[-1][1]-l4[0][1])+abs(l2[-1][0]-l4[0][0]))

print(ans)

### FIXED CODE ###

N = int(input())
z = []
zz = []
for _ in range(N):
    x, y = map(int, input().split())
    zz.append(x-y)
    z.append(x+y)
z.sort()
zz.sort()
ans = z[-1]-z[0]
ans = max(ans, zz[-1]-zz[0])

print(ans)
# -*- coding: utf-8 -*-
n = int(input())
ta = [list(map(int,input().split())) for i in range(n)]

cur_t = 1
cur_a = 1


def ceil(a, b):
    return a // b + int(a % b != 0)

for t,a in ta:
    if cur_t > t or cur_a > a:
        rate = ceil(max([cur_t/t,cur_a/a]))
        cur_t = t*rate
        cur_a = a*rate
    else:
        cur_t=t
        cur_a=a
print(cur_t+cur_a)


### FIXED CODE ###

# -*- coding: utf-8 -*-
n = int(input())
ta = [list(map(int,input().split())) for i in range(n)]

cur_t = 1
cur_a = 1


def ceil(a, b):
    return a // b + int(a % b != 0)

for t,a in ta:
    if cur_t > t or cur_a > a:
        rate = max([ceil(cur_t,t),ceil(cur_a,a)])
        cur_t = t*rate
        cur_a = a*rate
    else:
        cur_t=t
        cur_a=a
print(cur_t+cur_a)
from collections import Counter


def mathgcd(x, y):
    if y == 0:
        return x
    else:
        return mathgcd(y, x % y)


N = int(input())
points = [tuple(map(int, input().split())) for _ in range(N)]
vecs = {}
counter = Counter()

for i, p in enumerate(points):
    for j in range(i, N):
        if j == i:
            continue
        q = points[j]
        a = min(p, q)
        b = max(p, q)
        dx = b[0] - a[0]
        dy = b[1] - a[1]
        gcd = mathgcd(dx, dy)
        if gcd != 0:
            dx //= gcd
            dy //= gcd
        vecs[(i, j)] = (dx, dy)
        counter[(dx, dy)] += 1

vec, _ = counter.most_common()[0]
dx, dy = vec
visited = set()
cost = 0

for i, p in enumerate(points):
    if i in visited:
        continue
    cost += 1
    for j in range(i, N):
        if j == i:
            continue
        if vecs[(i, j)] == (dx, dy):
            visited.add(j)

print(cost)


### FIXED CODE ###

from collections import Counter


def main():
    N = int(input())
    points = [tuple(map(int, input().split())) for _ in range(N)]
    counter = Counter()

    if N == 1:
        print(1)
        return

    for i in range(N):
        for j in range(N):
            if j == i:
                continue
            a = points[i]
            b = points[j]
            dx = b[0] - a[0]
            dy = b[1] - a[1]
            counter[(dx, dy)] += 1

    vec, _ = counter.most_common()[0]
    dx, dy = vec
    visited = set()
    pointset = set(points)
    cost = 0

    for p in points:
        if p in visited:
            continue
        visited.add(p)
        x, y = p
        cost += 1

        i = 1
        while True:
            n = (x + i * dx, y + i * dy)
            i += 1
            if n in pointset:
                visited.add(n)
            else:
                break
        i = 1
        while True:
            n = (x - i * dx, y - i * dy)
            i += 1
            if n in pointset:
                visited.add(n)
            else:
                break

    print(cost)


main()
R=int(input())

print(3.14*math.tau)

### FIXED CODE ###

import math
R=int(input())

print(R*math.tau)
N = int(input())
k = 0
for i in range(1, N+1):
    if 1 =< i =< 9:
        k += 1
    elif 100 =< i =< 999:
        k += 1
    elif 10000 =< i =< 99999:
        k += 1
print(k)


### FIXED CODE ###

N = int(input())
k = 0
for i in range(1, N+1):
    if 1 <= i <= 9:
        k += 1
    elif 100 <= i <= 999:
        k += 1
    elif 10000 <= i <= 99999:
        k += 1
print(k)
import sys
input = sys.stdin.readline
def main():
	N = int(input())
	a = list(map(int,input().split()))
	a.sort(reverse=True)
	sum_list = [a[0]]
	for i in range(N-1):
		sum_list.append(sum_list[i]+a[i+1])
	count = 1
	sum(a) = A
	for i in range(N):
		if (A-sum_list[i])*2 >= a[i]:
			count += 1
		else:
			break

	print(count)

if __name__ == "__main__":
	main()


### FIXED CODE ###

import sys
input = sys.stdin.readline
def main():
	N = int(input())
	a = list(map(int,input().split()))
	a.sort()
	sum_list = [a[0]]
	for i in range(N-1):
		sum_list.append(sum_list[i]+a[i+1])
	count = 0
	for i in range(N-1):
		if 2*sum_list[i] < a[i+1]:
			count = i+1

	print(N-count)

if __name__ == "__main__":
	main()
#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    def uniq(arr):
        ret = [arr[0]]
        for a in arr[1:]:
            if ret[-1] == a:
                continue
            ret.append(a)
        return ret

    def compress(arr):
        if len(arr) <= 2:
            return arr
        ret = [arr[0]]        
        for a0, a1, a2 in zip(arr, arr[1:], arr[2:]):
            if a0 < a1 < a2 or a0 > a1 > a2:
                continue
            ret.append(a1)
        ret.append(arr[-1])
        return ret

    B = uniq(A)
    C = compress(B)
    ans, m, s = 1000, 1000, 0
    for c0, c1 in zip(C, C[1:]):
        if c0 < c1:
            t = m // c0
            s += t
            m -= t * c0
        else:
            m += c0 * s
            s = 0
        ans = max(ans, m)
    else:
        m += c1 * s
        ans = max(ans, m)
    return ans

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    print(solve(N, A))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    def uniq(arr):
        ret = [arr[0]]
        for a in arr[1:]:
            if ret[-1] == a:
                continue
            ret.append(a)
        return ret

    def compress(arr):
        if len(arr) <= 2:
            return arr
        ret = [arr[0]]        
        for a0, a1, a2 in zip(arr, arr[1:], arr[2:]):
            if a0 < a1 < a2 or a0 > a1 > a2:
                continue
            ret.append(a1)
        ret.append(arr[-1])
        return ret

    B = uniq(A)
    C = compress(B)
    if len(C) == 1:
        return 1000
    ans, m, s = 1000, 1000, 0
    for c0, c1 in zip(C, C[1:]):
        if c0 < c1:
            t = m // c0
            s += t
            m -= t * c0
        else:
            m += c0 * s
            s = 0
        ans = max(ans, m)
    else:
        m += c1 * s
        ans = max(ans, m)
    return ans

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    print(solve(N, A))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()
= int(input()

z = 0
for i in range(len(xu)):
    x, y = input().split()
    x = int(x)
    if y == 'JPY':
        z += x
    else:
        z += x*380000
print(z)


### FIXED CODE ###

# ABC119B

n = int(input())

z = 0
for i in range(n):
    x, y = input().split()
    x = float(x)
    if y == 'JPY':
        z += x
    else:
        z += x*380000
print(z)
n = input()
judge = False
for i in range(len(n)):
  if n[i] == 7:
    judge = True
    break
if judge == True:
  return "Yes"
else:
  return "No"



### FIXED CODE ###

n = input()
judge = False
for i in range(len(n)):
    if n[i] == "7":
        judge = True
        break
if judge == True:
    print("Yes")
else:
    print("No")
def input_one_number():
    return int(input())


D = input_one_number()

def input_multiple_number_as_list():
    return list(map(int, input().split()))

c = input_multiple_number_as_list()
last = [-1]*26


s = [[]*26 for _ in range(D)]

def dot(day):
	k = [0]*26
	for i in range(26):
		k[i] = c[i]*(day+1-last[i])
	return k


for i in range(D):
	s[i] = input_multiple_number_as_list()

for day in range(D):
	maxSatis = max(s[day])
	damage = dot(day)
	maxDamage = max(damage)

	if(maxSatis > maxDamage):
		idx = s[day].index(maxSatis)
		print(idx+1)
		last[idx] = day
	else:
		idx = s[day].index(maxDamage)
		print(idx+1)
		last[idx] = day



### FIXED CODE ###

def input_one_number():
    return int(input())


D = input_one_number()

def input_multiple_number_as_list():
    return list(map(int, input().split()))

c = input_multiple_number_as_list()

s = [[]*26 for _ in range(D)]

for i in range(D):
	s[i] = input_multiple_number_as_list()

for day in range(D):
	m = max(s[day])
	print(s[day].index(m)+1)
s = input()
k = int(input())

k_list = [] 
for i in range(1, len(s)+1):
    for j in range(len(s)+1-i):
        sub = s[j:j+i]
        if sub not in k_list:
            k_list.append(sub)
a.sort()
print(a[k-1])

### FIXED CODE ###

s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)

for i in range(2, k+1):
    for j in range(len(s)):
        k_list.add(s[j:j+i])

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])
l=input()
ls=l.split(" ")
X=int(ls[0])
N=int(ls[1])
lstr=input()
lst=lstr.split(" ")
fl=[];
if(lst!=[]):
    for a in lst:
         fl.append(int(a))
else:
    print(X)
for a in range(len(fl)):
    if(X-a not in fl):
         print(X-a)
         break
    if(X+a not in fl):
         print(X+a)
         break


### FIXED CODE ###

l=input()
ls=l.split(" ")
X=int(ls[0])
N=int(ls[1])
lstr=input()
lst=lstr.split(" ")
fl=[]
if(N!=0):
    for a in lst:
         fl.append(int(a))
for a in range(101):
    if(X-a not in fl):
         print(X-a)
         break
    if(X+a not in fl):
         print(X+a)
         break
import numpy as np
import sys 


def main():
    H, W = [int(x) for x in sys.stdin.readline.split()]
    board = [[0 for i in range(H)] for j in range(W)]

    """ #は1, .は0 """
    for i in range(H):
        X = sys.stdin.readline
        for j in range(len(X)):
            if X[j] == "#":
                board[i][j] = 1

    num_board = np.array(board)
    height, width = num_board.shape[:2]
    count = 0
    height_r, width_r = range(height), range(width)
    while (np.sum(num_board) != height*width):
        num_board_ans = np.zeros((height, width))
        for i in height_r:
            for j in width_r:
                if num_board[i, j] == 1:
                    num_board_ans[i, j] = 1
                    a = max(i-1, 0)
                    num_board_ans[a, j] = 1
                    b = max(j-1, 0)
                    num_board_ans[i, b] = 1
                    c = min(i+1, height-1)
                    num_board_ans[c, j] = 1
                    d = min(j+1, width-1)
                    num_board_ans[i, d] = 1
        num_board = num_board_ans
        count += 1

    print(count)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from collections import deque


def bfs(h, w, board, visited):
    queue = deque([])
    for i in range(h):
        for j in range(w):
            if board[i][j] == "#":
                queue.append([i, j])
                visited[i][j] = 0
    ans = 0
    while queue:
        y, x = queue.popleft()
        for i, j in ([1, 0], [0, 1], [-1, 0], [0, -1]):
            yn, xn = y+i, x+j
            if yn >= h or xn >= w or yn < 0 or xn < 0:
                continue
            if visited[yn][xn] == -1 and board[yn][xn] == ".":
                visited[yn][xn] = visited[y][x] + 1
                queue.append([yn, xn])
                ans = max(ans, visited[yn][xn])

    return ans


def main():
    h, w = map(int, input().split())
    board = [input() for _ in range(h)]
    visited = [[-1 for _ in range(w)] for _ in range(h)]
    print(bfs(h, w, board, visited))


if __name__ == "__main__":
    main()
#include <iostream>
#include <vector>
#include<algorithm>
#define intt long long
const intt NUM = 1000000007;

int main(){
	intt N{}, K{}, initi{}, initi2{}; std::cin >> N >> K;
	std::vector<intt> A(N); for (auto& r : A) { std::cin >> r; }
	for (intt i = 0; i < N - 1; ++i) for (intt j = i + 1; i < N; ++i) if (A[i] > A[j]) {++initi; initi %= NUM;}
	for (intt i = 0; i < N; ++i) for (intt j = 0; j < N; ++j) if (A[i] > A[j]) { ++initi2; initi2 %= NUM; }
	std::cout << ((((initi % NUM) * K) % NUM) + ((initi2 % NUM) * (((K * (K - 1)) % NUM) / 2) ) % NUM)<< std::endl;
	return 0;
}

### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int, input().split()))
total_1 = 0
for i in range (n - 1):
    for j in range (i + 1, n):
        if a[i] > a[j]:
            total_1 += 1
total_2 = 0
for i in range (n):
    for j in range (n):
        if a[i] > a[j]:
            total_2 += 1
print((total_1 * k + (total_2 * k * (k - 1)) // 2) % (10 ** 9 + 7))
import numpy as np

#入力
n = int(input())

#要素数の確認
def element_check(before,after,matirx):
    diff = after - before
    if diff == 1:
        a = np.delete(matirx,-1)
        return a
    if diff == 2:
        a = np.delete(matirx,-1)
        b = np.delete(a,-1)
        return b

#3の倍数をFに変更
def multiples_3(matrix):
    #列ベクトルを削除(3列目)
    m_de = np.delete(fizzbuzz_list, [2, 3], axis=1)
    #Fの列ベクトルを作成
    f_list = np.zeros(j,dtype = object).reshape(-1, 1)
    f_list.fill("F")
    #結合
    result = np.concatenate([m_de, f_list], 1)
    return result

#列を計算(繰り上げ)
j = -(-n // 3)

#1からnまでの配列を作成
fizzbuzz_list = np.arange(1,n+1,dtype=object)
#要素数
before_size = fizzbuzz_list.size
#3*n行列に変更
fizzbuzz_list.resize((j,3))

#3の倍数をFに変更
fizzbuzz_list = multiples_3(fizzbuzz_list)

#5の倍数をBに変更
n_b_1 = np.arange(3,j,5)
n_b_2 = np.arange(1,j,5)

fizzbuzz_list[n_b_1,0] = "B"
fizzbuzz_list[n_b_2,1] = "B"

#15の倍数をFBに変更
n_fb = np.arange(4,j,5)
fizzbuzz_list[n_fb,2] = "FB"

#要素をチェック
result = element_check(before_size,fizzbuzz_list.ravel().size,fizzbuzz_list.ravel())

print(np.sum(result))

# np.where(fizzbuzz_list[:,2:3],fizzbuzz_list,"F")


### FIXED CODE ###


N = int(input())

total = 0

for i in range(N):

    if (i+1) % 15 == 0:
        pass
    elif (i+1) % 3 == 0:
        pass
    elif (i+1) % 5 == 0:
        pass
    else:
        total += (i+1)
        
print(total)
x=[0,0,0,0,0,0,1,2,3,-1,-2,-3]
y=[1,2,3,-1,-2,-3,0,0,0,0,0,0]

def dfs(ty,tx):
    if L[ty][tx]==1:
        L[ty][tx]=0
        for i,j in zip(x,y):
            dx,dy=tx+i,ty+j
            if 0<=dx<8 and 0<=dy<8:
                dfs(dy,dx)
    return

n=input()
for i in range(n):
    L=[map(int,raw_input()) for j in range(8)]
    ax,ay=input(),input()
    dfs(ay-1,ax-1)
    print "Data %d:"%(i+1)
    for j in range(8):
        print "".join(map(str,L[j]))

### FIXED CODE ###

x=[0,0,0,0,0,0,1,2,3,-1,-2,-3]
y=[1,2,3,-1,-2,-3,0,0,0,0,0,0]

def dfs(ty,tx):
    if L[ty][tx]==1:
        L[ty][tx]=0
        for i,j in zip(x,y):
            dx,dy=tx+i,ty+j
            if 0<=dx<=7 and 0<=dy<=7:
                dfs(dy,dx)
    return

n=input()
for i in range(n):
    skip=raw_input()
    L=[map(int,raw_input()) for j in range(8)]
    ax,ay=input(),input()
    dfs(ay-1,ax-1)
    print "Data %d:"%(i+1)
    for j in range(8):
        print "".join(map(str,L[j]))
abc = map(int, input().split())

abc_set = set(abc)

if len(set) == 2:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

abc = map(int, input().split())
 
abc_set = set(abc)

if len(abc_set) == 2:
  print('Yes')
else:
  print('No')
n, k = list(map(int, input().split()))
s = input()

end = []
start = []

if s[0] == "1":
	start.append(0)
else:
	#仮想的な1の区間を作る
	start.append(0)
	end.append(0)


for i in range(1, n-1):
	if s[i-1] == "0" and s[i] == "1":
		start.append(i)
	if s[i] == "1" and s[i+1] == "0":
		end.append(i)

if s[-1] == "1":
	end.append(n-1)
else:
	#仮想的な1の区間を作る
	start.append(n-1)
	end.append(n-1)

ans = 0
for j in range(len(start) - k):
	temp = end[j+k] - start[j] + 1 
	if temp > ans:
		ans = temp

if len(start) <= k:
	ans = n

print(ans)


### FIXED CODE ###

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

end = []
start = []

if s[0] == "1":
	start.append(0)
else:
	#仮想的な1の区間を作る
	start.append(0)
	end.append(0)

for i in range(n-1):
	if s[i] == "1" and s[i+1] == "0":
		end.append(i)
for i in range(1, n):
	if s[i-1] == "0" and s[i] == "1":
		start.append(i)

if s[-1] == "1":
	end.append(n-1)
else:
	#仮想的な1の区間を作る
	start.append(n-1)
	end.append(n-1)

ans = 0

"""print(start, end, ans)
print(len(start), len(end), ans)"""

for j in range(len(start) - k):
	temp = end[j+k] - start[j] + 1 
	if temp > ans:
		ans = temp

if len(start) <= k:
	ans = n

print(ans)
import sys
from fractions import gcd
N, M = map(int, input().split())
an = list(map(int, input().split()))

l = an[0]
for a in an[1:]:
    LCM = l*a//gcd(l, a)
    if LCM//l % 2 == LCM//a % 2 == 1:
        lcm = LCM
    else:
        print(0)
        sys.exit()
print((M//lcm+1)//2)

### FIXED CODE ###

import fractions
from functools import reduce
import numpy as np
import sys

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


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


def listdivide(list):
    numpy = np.array(list)
    numpy = numpy//2
    return numpy.tolist()


def divide2(x):
    res = 0
    while x % 2 == 0:
        x /= 2
        res += 1
    return res


# while gcd_list(an) % 2 == 0:
#     print(gcd_list(an))
an = listdivide(an)

t = divide2(an[0])
for i in range(1, N):
    if divide2(an[i]) != t:
        print(0)
        sys.exit()

for i in range(t):
    an = listdivide(an)
    M = M // 2

LCM = lcm_list(an)

if LCM > M == 0:
    print(0)
else:
    print(-(-(M // LCM)//2))