n = int(input())
a = list(map(int, input().split()))
num = [0] * (n)
num[0] = a[0]
for i in range(n - 1):
    num[i + 1] = num[i] * a[i + 1]
import math
flag = False
for i in range(n):
    s = math.gcd(num[i], num[n - 1] // num[i])
    if s != 1:
        flag = True
        break
        
if flag:
    ans = a[0]
    for i in range(1, n):
        ans = math.gcd(ans, a[i])
    if ans == 1:
        print('setwise coprime')
    else:
        print('not coprime')
else:
    print('pairwise coprime')