import math
 
n = int(input())
a = list(map(int,input().split()))
 
lcm = a[0]
pwise_flag = True
for i in range(1,n):
    gcd = math.gcd(lcm,a[i])
    if gcd != 1:
        pwise_flag = False
        break
    else:
        lcm = lcm*a[i]
        
if pwise_flag:
    print('pairwise coprime')
else:
    g = a[0]
    for i in range(1,n):
        g = math.gcd(g,a[i])
    if g == 1:
        print('not coprime')
    else:
        print('setwise coprime')