import sys
import math
from functools import reduce
N = str(input())
A = list(map(int, input().split()))

def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
d = 0
for i,o in enumerate(A):
    for l in A[i:]:
        if math.gcd(o,l) != 1:
            d = 1
            break
            
if d == 1:
    print('pairwise coprime')
    exit()

if gcd(*A) == 1:
    print('setwise coprime')
    exit()

print('not coprime')
