from math import *
def gcds(a):
    tmp = a[0]
    for i in range(1,len(a)):
        tmp = gcd(tmp,a[i])
    return tmp

multiplied_a = [1]
n = int(input())
a = list(map(int,input().split()))
for i in a:
    multiplied_a.append(multiplied_a[-1]*i)
Flag = True
for i in range(n-1):
    other = multiplied_a[-1] // multiplied_a[i+1] 
    #print(a[i],other,gcd(a[i],other))
    if gcd(a[i],other) != 1:
        Flag = False
        break
if Flag:
    print('pairwise coprime')
    exit()
if gcds(a) == 1:
    print('setwise coprime')
else:
    print('not coprime')