Harryxun/stf_run huggingface dataset:
mod = 10 ** 9 + 7

n,m = map(int,input().split())
lis = [int(input()) for x in range(m)]

stairs = [0 for x in range(n)]
stairs[0] = 1
if 1 in lis:
    stairs[1] = 0
else:
    stairs[1] = 1
#print(stairs)
f = 0
for x in range(2,n):
    if x in lis:
        stairs[x] = 0
    else:
        stairs[x] = (stairs[x-1] + stairs[x-2]) % mod
    
#print(stairs)
print((stairs[n-1] + stairs[n-2]) % mod)
    


### FIXED CODE ###

import sys
mod = 10 ** 9 + 7

n,m = map(int,input().split())
if n in [0,1]:
    print(1)
    sys.exit()
    
if not m == 0: lis = [int(input()) for x in range(m)]
else: lis = [-1]
val1 = 1
if 1 in lis: val2 = 0
else: val2 = 1

if lis[0] == 1 and len(lis) >= 2:
    flg = lis[1]
    nex = 1
else:
    flg = lis[0]
    nex = 0
#print(lis)
for x in range(2,n):
    if x == flg: #x in lis
        #print(flg)
        nex += 1
        try: flg = lis[nex]
        except:flg = 0
        now = 0
    else:
        now = (val1 + val2) % mod
    val1,val2 = val2,now
    
print((val1 + val2) % mod)
s=input()
cnt=0
for i in range(n):
    if s[i] == 'a' and cnt < a+b:
        print('Yes')
        cnt+=1
    elif s[i] == 'b' and cnt < a+b and i+1 <=b:
        print('Yes')
        cnt+=1
    elif s[i] == 'c':
        print('No')
    else:
        print('No')

### FIXED CODE ###

n,a,b=map(int,input().split())
s=input()
cnt=0
cnt_f=0
for i in range(n):
    if s[i] == 'a' and cnt < a+b:
        print('Yes')
        cnt+=1
    elif s[i] == 'b' and cnt < a+b and cnt_f < b:
        print('Yes')
        cnt+=1
        cnt_f+=1
    elif s[i] == 'c':
        print('No')
    else:
        print('No')
import math

n = int(input())
print(pow(2, math.floor(math.log2(n))))


### FIXED CODE ###

import math

n = int(input())
print(pow(2, math.floor(math.log2(n))))
# coding:utf-8

K, A, B = [int(i) for i in input().split()]

def cal(K, A, B):
    BNUM = 1
    TRANS_GET = B - A
    # 操作開始
    counter = 0
    while counter < K:
        nokori = K - counter
        if BNUM >= A:
        # 交換可能
            if nokori >= 2:
                syou = int(nokori / 2)
                amari = nokori % 2
                BNUM += TRANS_GET * syou + amari
                break
            else:
                BNUM += nokori
                break
        else:
        # 交換不可
            atonanko = A - BNUM
            if atonanko < nokori-2:
                BNUM += atonanko
                counter += atonanko
            else:
                BNUM += nikori
                break
    return BNUM


if A < B:
    if B - A > 2:
        max_b = cal(K, A, B)
    else:
        max_b = 1 + K
else:
    max_b = 1 + K

print(max_b)

### FIXED CODE ###

# coding:utf-8

K, A, B = [int(i) for i in input().split()]

def cal(K, A, B):
    BNUM = 1
    TRANS_GET = B - A
    # 操作開始
    counter = 0
    while counter < K:
        nokori = K - counter
        if BNUM >= A:
        # 交換可能
            if nokori >= 2:
                syou = int(nokori / 2)
                BNUM += TRANS_GET * syou
                counter += syou * 2
            else:
                # 叩く
                BNUM += 1
                counter += 1
        else:
        # 交換不可
            atonanko = A - BNUM
            if atonanko <= nokori-2:
                BNUM += atonanko
                counter += atonanko
            else:
                BNUM += nokori
                break
    return BNUM


if B - A <= 2:
    max_b = 1 + K
else:
    max_b = cal(K, A, B)

print(max_b)
from operator import itemgetter
n,m=map(int,input().split())
l=[]
for i in range(n):
  a,b=map(int,input().split)
  l.append([a,b])
l.sort(key=itemgetter(0))
s=0
for j in range(n):
  s=s+l[j][0]*min(l[j][1],m)
  m=m-l[j][1]
  if m<0:
    break
return s 

### FIXED CODE ###

from operator import itemgetter
n,m=map(int,input().split())
l=[]
for i in range(n):
  a,b=map(int,input().split())
  l.append([a,b])
l.sort(key=itemgetter(0))
s=0
for j in range(n):
  s=s+l[j][0]*min(l[j][1],m)
  m=m-l[j][1]
  if m<0:
    break
print(s)
print(sum(T[:P-1])+X+sum(T[P:]))

### FIXED CODE ###

N=int(input())
T=list(map(int,input().split()))
M=int(input())
for i in range(M):
    P,X=map(int,input().split())
    print(sum(T[:P-1])+X+sum(T[P:]),end="\n")
n, k, q = map(int, input().split())
a = [(int(x), i) for i, x in enumerate(input().split())]
a.sort()
m = a[q - 1][0] - a[0][0]
v = []
for i in range(1, n - q + 1):
    mi = a[q - 1 + i][0] - a[i][0]
    bis = list(range(i))
    for ai in range(i, i + q):
        ok = True
        for bi in bis:
            if abs(a[bi][1] - a[ai][1]) < k:
                bis.append(ai)
                ok = False
                con = False
                if i + q < n:
                    mi = a[q + i][0] - a[i][0]
                    if mi < m:
                        con = True
                break
        if con: continue
        break
    if ok:
        m = mi
print(m)


### FIXED CODE ###

n, k, q = map(int, input().split())
a = [int(x) for x in input().split()]
m = None
for x in a:
    b = []
    c = []
    for y in a:
        if y < x:
            if len(c) >= k:
                c.sort()
                b.extend(c[:len(c) - k + 1])
            c = []
        else:
            c.append(y)
    if len(c) >= k:
        c.sort()
        b.extend(c[:len(c) - k + 1])
    if len(b) >= q:
        b.sort()
        if m is None or m > b[q - 1] - x: m = b[q - 1] - x
print(m)
a,b=map(int,input().split())
if a==1:
    print("Alice")
elif b==1:
    print("Bob")
elif a<b:
    print("Bob")
elif:b<a
    print("Alice")
else:
    print("Draw")


### FIXED CODE ###

a,b=map(int,input().split())
if a==b:
    print("Draw")
elif a==1:
    print("Alice")
elif b==1:
    print("Bob")
elif a<b:
    print("Bob")
else:
    print("Alice")
N = int(input())
X = (N%100)%10
if X == 3:
  print('bon')
elif X == 0 or X = 1 or X == 6 or X = 8:
  print('pon')
else:
  print('hon')

### FIXED CODE ###

N = int(input())
X = (N%100)%10
if X == 3:
  print('bon')
elif X == 0 or X == 1 or X == 6 or X == 8:
  print('pon')
else:
  print('hon')
A, B, C, K = map(int, input().split())
if((K-A)>0):
    Y = K-A
else:
    Y = 0
if((Y-B)>0):
    Z = Y-B
else:
    Z = 0

X = A * K + 0 * Y + (-1) * Z
print(X)

### FIXED CODE ###

S = input()
T = input()

if(S==T[0:len(S)]):
  print('Yes')
else:
    print('No')
n,a,b=map(int,input().split())
s=input()
all=a+b
in=b
for i in range(n):
  if all==0:
    print('No')
  elif s[i]=='a':
    print('Yes')
    all-=1
  elif s[i]=='b' and in>0:
    print('Yes')
    all-=1
    in-=1
  else:
    print('No')

### FIXED CODE ###

n,a,b=map(int,input().split())
s=input()
all=a+b
inter=b
for i in range(n):
  if all==0:
    print('No')
  elif s[i]=='a':
    print('Yes')
    all-=1
  elif s[i]=='b' and inter>0:
    print('Yes')
    all-=1
    inter-=1
  else:
    print('No')
# -*- coding: utf-8 -*-

import sys
import os
import math

# refs
# https://shikousakugo.wordpress.com/2012/06/27/ray-intersection-2/

def det(a, b, c):
    return + a[0] * b[1] * c[2] \
           + a[2] * b[0] * c[1] \
           + a[1] * b[2] * c[0] \
           - a[2] * b[1] * c[0] \
           - a[1] * b[0] * c[2] \
           - a[0] * b[2] * c[1]

def sub(v0, v1):
    # v0 - v1
    return (v0[0] - v1[0], v0[1] - v1[1], v0[2] - v1[2])

# me
p0 = list(map(int, input().split()))

# enemy
p1 = list(map(int, input().split()))

# barrier
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

a = sub(p1, p0)
b = sub(A, B)
c = sub(A, C)
d = sub(A, p0)

denom = det(a, b, c)
if denom > -0.0000001:
    t = det(d, b, c) / denom
    u = det(a, d, c) / denom
    v = det(a, b, d) / denom

    lower = -0.0000001
    upper = 1.0000001
    if lower <= u <= upper and lower <= v <= upper and lower <= u + v <= upper:
        print('MISS')
    else:
        print('HIT')
else:
    print('HIT')

### FIXED CODE ###

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

import sys
import os
import math
import random

# refs
# https://shikousakugo.wordpress.com/2012/06/27/ray-intersection-2/

def det(a, b, c):
    return + a[0] * b[1] * c[2] \
           + a[2] * b[0] * c[1] \
           + a[1] * b[2] * c[0] \
           - a[2] * b[1] * c[0] \
           - a[1] * b[0] * c[2] \
           - a[0] * b[2] * c[1]

def sub(v0, v1):
    # v0 - v1
    return (v0[0] - v1[0], v0[1] - v1[1], v0[2] - v1[2])

# me
p0 = list(map(int, input().split()))

# enemy
p1 = list(map(int, input().split()))

# barrier
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

a = sub(p1, p0)
b = sub(A, B)
c = sub(A, C)
d = sub(A, p0)

EPS = 0.0000001
lower = -EPS
upper = 1 + EPS

denom = det(a, b, c)

if denom != 0:
    t = det(d, b, c) / denom
    u = det(a, d, c) / denom
    v = det(a, b, d) / denom

    if t < lower:
        print('HIT')

    # hit barrier
    elif lower < t < upper and lower <= u <= upper and lower <= v <= upper and lower <= u + v <= upper:
        print('MISS')

    else:
        print('HIT')
else:
    print('HIT')
S = input()
S[3] = 8
print(S)


### FIXED CODE ###

S = input()
S = S[:3] + '8' + S[4:]
print(S)
import numpy as np
N, K = map(int, raw_input().split())
A = map(int, raw_input().split())
numbers = {}
for a in A:
    numbers[a] = numbers.get(a, 0) + 1
M = len(numbers)
dp = np.full((M+1, M+1), N)
dp[0,:] = 0
for i, n in enumerate(numbers.values()):
    for j in range(M+1):
        if j > 0:
            dp[i+1,j] = min(dp[i+1,j], dp[i,j-1], dp[i,j] + n)
        else:
            dp[i+1,j] = min(dp[i+1,j], dp[i,j] + n)
print min(dp[M,:K+1])

### FIXED CODE ###

def solve(N, K, A):
    numbers = {}
    for a in A:
        numbers[a] = numbers.get(a, 0) + 1
    if len(numbers) <= K:
        return 0
    return N - sum(sorted(numbers.values(), key=lambda x: -x)[:K])
N, K = map(int, raw_input().split())
A = map(int, raw_input().split())
print solve(N, K, A)
from collections import Counter
n = int(input())
V = list(map(int,input().split()))
V_odd = V[::2]
v_eve = V[1::2]
odd_max = Counter(V_odd).most_common(1)
even_max = Counter(v_eve).most_common(1)

result = n - odd_max[0][1] - even_max[0][1]
if odd_max[0][0] == even_max[0][0]:
    odd_least,even_least = 0,0
    if Counter(V_odd).most_common(1) != Counter(V_odd).most_common(2):
        odd_least = (Counter(V_odd).most_common(2))[0][1]
    if Counter(v_eve).most_common(1) != Counter(v_eve).most_common(2):
        even_least = (Counter(V_eve).most_common(2))[0][1]
    if Counter(V_odd).most_common(1) == Counter(V_odd).most_common(2) and Counter(v_eve).most_common(1) == Counter(v_eve).most_common(2):
        result = int(n/2)
    else:
        result = min(n - odd_least - even_max,n - even_least - odd_max)


print(result)

### FIXED CODE ###

from collections import Counter
n = int(input())
V = list(map(int,input().split()))
V_odd = V[::2]
V_eve = V[1::2]
odd_max = Counter(V_odd).most_common(1)
even_max = Counter(V_eve).most_common(1)

result = n - odd_max[0][1] - even_max[0][1]
if odd_max[0][0] == even_max[0][0]:
    odd_least,even_least = 0,0
    if Counter(V_odd).most_common(1) != Counter(V_odd).most_common(2):
        odd_least = (Counter(V_odd).most_common(2))[1][1]
    if Counter(V_eve).most_common(1) != Counter(V_eve).most_common(2):
        even_least = (Counter(V_eve).most_common(2))[1][1]
    if Counter(V_odd).most_common(1) == Counter(V_odd).most_common(2) and Counter(V_eve).most_common(1) == Counter(V_eve).most_common(2):
        result = int(n/2)
    else:
        result = min(n - odd_least - even_max[0][1],n - even_least - odd_max[0][1])

print(result)
A, B, N = map(int, input().split())

if N < B:
    if N % B == 0:
        x = N-1
    else:
        x = N
        ans = math.modf((N/B))[0]*A

else:
    if N % B == 0:
        x = (N-1)%B
    else:
        x = N%B

ans = math.modf((x/B))[0]*A
print(int(ans))

### FIXED CODE ###

import math
A, B, N = map(int, input().split())

if N < B:
    if N % B == 0:
        x = N-1
    else:
        x = N

else:
    if N % B == 0:
        x = B-1
    else:
        x = B-1

ans = math.modf((x/B))[0]*A
print(int(ans))
x=int(input())
if x == 1:
  print('Hello World')
else:
  a,b=map(int,input().split())
  print(a+b)


### FIXED CODE ###

x=int(input())
if x == 1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(a+b)
import math

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

if 0 not in A:
  for i in A:
    l.append(math.log10(A[i]))
  if sum(l)<18: 
    print(int(10**sum(l)))
  else:
    print(str(-1))
else:
  print(str(0))


### FIXED CODE ###

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

if 0 in a:
  print(0)

else:
  ans = 1
  for i in range(n):
    ans *= a[i]
    if ans > 10 ** 18:
      print(-1)
      exit()
  print(ans)
N=input()
print(input().count("ABC")

### FIXED CODE ###

N = int(input())
S = input()
ans = 0

for i in range(len(S)-2):
    tmp = 0
    if S[i]=="A" and S[i+1] == "B" and S[i+2] == "C":
        ans += 1

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

fromLeft = [-1]*n

for i in range(n):
    fromLeft[i] = a[i] - i

ans = 0

ldList = [0]*(3*10**5)

for i in reversed(range(n)):
    ldList[fromLeft[i]] += 1
    ans += ldList[-1*a[i]-i]

print(ans)

### FIXED CODE ###

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

fromLeft = [-1]*n

for i in range(n):
    fromLeft[i] = a[i] - i

ans = 0

ldList = [0]*(n*2+5)

for i in reversed(range(n)):
    if 0 <= fromLeft[i]+n+1 and fromLeft[i]+n+1 < n*2+5:
        ldList[fromLeft[i]+n+1] += 1
    if 0 <= -1*a[i]-i+n+1 and -1*a[i]-i+n+1 < n*2+5:
        ans += ldList[-1*a[i]-i+n+1]

print(ans)
N = int(input())
if N>0 or N<=100:
    A = []
    for i in range(0,N):
      B = int(input())
      if B>0 or B<=100:
          A.append(B)
 
    sum1 = 1/A[0]
 
    for i in range(0,N-1):
      sum1 = sum1 + 1/A[i+1]
 
    result = 1/sum1
    print(result)

### FIXED CODE ###

try:
    N = int(input())
    if N>0 or N<=100:
        S = input()
        A = S.split()
        A = list(map(int, A)) 
 
        sum1 = 1/A[0]
 
        for i in range(0,N-1):
         sum1 = sum1 + 1/A[i+1]
 
        result = 1/sum1
        print(result)

except:
        print("Error")
n , k = list(map(int, input().split()))
kaijou = []
kaijou.append(1)
kaijou.append(1)
i = 2
mod = 10 ** 9 + 7
while(i <= n):
    kaijou.append(i * kaijou[i - 1])
    i += 1
for i in range(1, k + 1):
    if i <= n - k + 1:
        b = (kaijou[k - 1] / (kaijou[i - 1] * kaijou[k - i]))
        a = (kaijou[n - k + 1] /  (kaijou[i] * kaijou[n - k + 1 - i]))
        print(int(a * b) % mod)
    else:
        print(0)

### FIXED CODE ###

import numpy as np
import math

n , k = list(map(int, input().split()))
def combi(a,b):
    return  math.factorial(a) // (math.factorial(b) * math.factorial(a-b))
i = 2
mod = 10 ** 9 + 7
for i in range(1, k + 1):
    if n - k + 1 >= i and k - 1 >= i - 1:
        print(int(combi(n - k + 1,i) * combi(k - 1, i - 1) % mod))
    else:
        print(0)
a=input().split()
a.sort()
cnt=0
while len(s)>0:
    i=a.count(a.pop(0))
    for j in range(i):
        a.pop(0)
    cnt+=1
print(cnt)

### FIXED CODE ###

a=input().split()
a.sort()
cnt=0
while len(a)>0:
    i=a.count(a.pop(0))
    for j in range(i):
        a.pop(0)
    cnt+=1
print(cnt)
N=int(input())
p=list(map(int,input().split()))
q=['x' for _ in range(N)]
ans=0
for i in range(N):
    if p[i]!=i+1:
        q[i]='o'
for i in range(N-1):
    if q[i]=='x':
        if i<n-1:
            p[i], p[i+1]=p[i+1], p[i]
        else:
            p[i], p[i-a1]=p[i-1], p[i]
        q[i]='o'
        q[i+1]='o'
        ans+=1

print(ans)


### FIXED CODE ###

N=int(input())
p=list(map(int,input().split()))
q=['x' for _ in range(N)]
ans=0
for i in range(N):
    if p[i]!=i+1:
        q[i]='o'
for i in range(N):
    if q[i]=='x':
        if i<N-1:
            p[i], p[i+1]=p[i+1], p[i]
            q[i+1]='o'
        else:
            p[i], p[i-1]=p[i-1], p[i]
            q[i-1]='o'
        q[i]='o'
        ans+=1

print(ans)
N, M = map(int, input().split(" "))
A_list = []
B_list = []
total = 0

for i in range(N):
    A, B = map(int, input().split(" "))
    A_list.append(A)
    B_list.append(B)

z = list(zip(A_list, B_list))
z.sort()

for a, b in z:
    if b > M:
        total += M * a
        break
    else:
        total += b * a
        M -= b

print(total)

### FIXED CODE ###

N, M = map(int, input().split(" "))
A_list = []
B_list = []
total = 0

for i in range(N):
    A, B = map(int, input().split(" "))
    A_list.append(A)
    B_list.append(B)

z = list(zip(A_list, B_list))
z.sort()

for a, b in z:
    if b > M:
        total += M * a
        break
    else:
        total += b * a
        M -= b

print(total)
N = int(input())
S = input()
#dp[i][j] S[i-x:i+1]==S[j-x:j+1]となる最大のx
dp = [[0] * (N + 1) for _ in range(N + 1)]
ans = 0
for i in range(N - 1):
    for j in range(i+1,N):
        if S[i] == S[j]:
            dp[i][j] = min(j - i, dp[i - 1][j - 1] + 1)
            ans = max(ans, dp[i])
print(ans)


### FIXED CODE ###

import itertools
N = int(input())
S = input()
dp = [[0] * N for _ in range(N)]
ans = 0
for i, j in itertools.combinations(range(N), 2):
    if S[i] == S[j]:
        dp[i][j] = dp[i - 1][j - 1] + 1
    else:
        dp[i][j] = 0
    ans = max(ans, min(j - i, dp[i][j]))
print(ans)
n=int(input())
l=[int(i) for i in input().split()]
sorted(l)
s=l[0]
for i in range(1,n):
	s+=l[i]
    s/=2
print(s)

### FIXED CODE ###

t=int(input())
l=sorted(map(int, input().split()))
s=l[0]
for i in range(1,t):
  
  s+=l[i]
  s/=2
print(s)
A,B=map(int,input().split())
S=input()
if (S[0:A].isdecimal()==True) and (S[A+1:-1].isdecimal()==True) and (S[A]=='-':
    print('Yes')
else:
    print('No')

### FIXED CODE ###

A,B=map(int,input().split())
S=input()
if S[:A].isdecimal() and S[A+1:].isdecimal() and S.count('-')==1 and len(S)==(A+B+1):
    print('Yes')
else:
    print('No')
a, b = map(int,input().split())
 
if 1<=a=<9 and 1<=b<=9:
  print(a*b)
else:
  print(-1)

### FIXED CODE ###

a, b = map(int,input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
    print(a*b)
else:
    print(-1)
def read_int():
    return int(input().strip())
 
 
def read_ints():
    return list(map(int, input().strip().split(' ')))
 
 
def solve():
    """
    OPT[N][W] = maximum value obtained with first N items and weights up to W
    OPT[N][W] = max(OPT[N-1][W-w[N]]+v[N], OPT[N-1][W])
    OPT[0][0] = 0
    """
    N, W = read_ints()
    w, v = [], []
    for _ in range(N):
        w0, v0 = read_ints()
        w.append(w0)
        v.append(v0)
    OPT = [[0]*(W+1) for _ in range(N+1)]
    for i in range(1,N+1):
        for j in range(1,W+1):
            OPT[i][j]=OPT[i-1][j]
            if j-w[i-1]>=0:
                OPT[i][j]=max(OPT[i][j],OPT[i-1][j-w[i-1]]+v[i-1])
    return OPT[-1][-1]
if __name__ == '__main__':
    print(solve())

### FIXED CODE ###

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

V = sum(v)
dp = [[10**100]* (V + 1) for _ in range(N+1)]

dp[0][0] = 0
for i in range(N):
    for j in range(V+1):
        dp[i+1][j] = dp[i][j]
        if j-v[i] >= 0:
            dp[i+1][j] = min(dp[i+1][j], dp[i][j-v[i]] + w[i])
        

ans = 0
for j in range(V + 1):
    if dp[N][j] <= W:
        ans = j

print(ans)
import math
n = int(input())
ans = int('inf')
for i in range(10^6):
  if n%(i+1) == 0:
    j = n/(i+1)
    ans = min(ans, (i+1)+j-2)
print(ans)

### FIXED CODE ###

n = int(input())
list = []
for i in range(1, int(n**0.5+1)):
  if n%i == 0:
    list.append(int(i + n/i))
print(min(list)-2)
X, Y = map(int, input().split()) 
ans = 'No'
for a in range(X + 1):
	b=X-a
	if 2 * a + 4 * b == Y:
		ans = 'Yes' print(ans)
  


### FIXED CODE ###

X, Y = map(int, input().split()) 
ans = 'No'
for a in range(X + 1):
	b=X-a
	if 2 * a + 4 * b == Y:
		ans = 'Yes' 
print(ans)
s = input()
if s[2]==s[3] and s[4]==s[5]:
    print(Yes)
else:
    print(No)

### FIXED CODE ###

s = str(input())
if s[2]==s[3] and s[4]==s[5]:
    print("Yes")
else:
    print("No")
a= ABC
S= input()

if a == S:
  print("ARC")
else:
  print("ABC")

### FIXED CODE ###

a =['ABC']
S=input()
if S in a:
  print("ARC")
else:
    print("ABC")
def sieve_eratosthenes(n):
    primes = [0, 1] * (n // 2 + 1)
    if n % 2 == 0:
        primes.pop()
    primes[1] = 0
    primes[2] = 1
    for p in range(3, n + 1, 2):
        if primes[p]:
            for q in range(p * p, n + 1, 2 * p):
                primes[q] = 0
    return primes

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

ps = set()
for i,m in enumerate(sieve_eratosthenes(1000000)):
    if m == 1:
        ps.add(i)

from collections import defaultdict
import math

n = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
for i in range(n):
    if a[-1-i] == 1:
        a.pop()
        n -= 1
    else:
        break

a.sort()

g = a[0]
for i in range(1,n):
    g = math.gcd(g, a[i])

if g == 1:
    if n > len(ps):
        print("setwise coprime")
    else:
        d = defaultdict(int)
        for i in range(n):
            f = factorization(a[i])
            for x, y in f:
                d[x] += 1
        for i in d.values():
            if i != 1:
                print("setwise coprime")
                exit()
        print("pairwise coprime")

else:
    print("not coprime")

### FIXED CODE ###

def sieve_eratosthenes(n):
    primes = [0, 1] * (n // 2 + 1)
    if n % 2 == 0:
        primes.pop()
    primes[1] = 0
    primes[2] = 1
    for p in range(3, n + 1, 2):
        if primes[p]:
            for q in range(p * p, n + 1, 2 * p):
                primes[q] = 0
    return primes

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

ps = set()
for i,m in enumerate(sieve_eratosthenes(1000000)):
    if m == 1:
        ps.add(i)

from collections import defaultdict
import math

n = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
one = False
for i in range(n):
    if a[-1] == 1:
        a.pop()
        one = True
        n -= 1
    else:
        break

if n==0 or n==1:
    print("pairwise coprime")
    exit()

a.sort()

g = a[0]
for i in range(1,n):
    g = math.gcd(g, a[i])

if g == 1:
    if n > len(ps):
        print("setwise coprime")
    else:
        d = defaultdict(int)
        for i in range(n):
            f = factorization(a[i])
            for x, y in f:
                d[x] += 1
        for i in d.values():
            if i != 1:
                print("setwise coprime")
                exit()
        print("pairwise coprime")

else:
    if one:
        print("setwise coprime")
    else:
        print("not coprime")
import numpy as np
import sys
input = sys.stdin.readline


def main():
    n, s = map(int, input().split())
    A = [int(i) for i in input().split()]

    MOD = 998244353

    dp = np.zeros(s + 1, dtype="int32")
    dp[0] = 1

    for a in A:
        p = (dp * 2) % MOD
        p %= MOD
        p[a:] += dp[:a]
        dp = p % MOD

    print(dp[s])


if __name__ == '__main__':
    main()


### FIXED CODE ###

import numpy as np
import sys
input = sys.stdin.readline


def main():
    n, s = map(int, input().split())
    A = [int(i) for i in input().split()]

    MOD = 998244353

    dp = np.zeros(s + 1, dtype="int32")
    dp[0] = 1

    for a in A:
        p = (dp * 2) % MOD
        p %= MOD
        p[a:] += dp[:-a]
        dp = p % MOD

    print(dp[s])


if __name__ == '__main__':
    main()