N = int(input())
li = list(map(int,input().split()))

L = [0] * 10**6

import math
from functools import reduce

if reduce(math.gcd,li)!=1:
    print('not coprime')
    exit()

for i in li:
    L[i] = 1
#print(L)

for k in range(2,10**6//2+1):
    t = 0
    for j in range(0,10**6,k):
        t += L[j]
    if t > 1:
        print('setwise coprime')
        exit()
print('pairwise coprime')