def find_gcd(x, y): 
    while(y): 
        x, y = y, x % y 
  
    return x

n = int(input())
arr = list(map(int, input().split()))
coprime = []
gcd = find_gcd(arr[0], arr[1])
for i in range(2,n):
    gcd = find_gcd(gcd, arr[i])

if gcd != 1:
    print("not coprime")
else:
    for i in range(n-1):
        for j in range(i+1, n):
            if find_gcd(arr[i],arr[j]) != 1 and gcd == 1:
                print('setwise coprime')
                exit()
    print('pairwise coprime')
