def gcd(a,b): 
      
    # Everything divides 0  
    if (a == 0): 
        return b 
    if (b == 0): 
        return a 
  
    # base case 
    if (a == b): 
        return a 
  
    # a is greater 
    if (a > b): 
        return gcd(a-b, b) 
    return gcd(a, b-a) 

n = int(input())
a = list(map(int, input().split()))
g = a[0]
f = 0
for i in range(1, n):
    g = gcd(g, a[i])
    if g!=1:
        f = 1
if g!=1:
    print("not coprime")
elif f:
    print("setwise coprime")
else:
    print("pairwise coprime")