import numpy as np

n=int(input())
a=list(map(int,input().split()))

gx=list()

jud=0

for i in range(n-1):
    g = np.gcd(a[i], a[i+1])
    if g!=1:
        jud=1
        break

if jud==0:
    print("pairwise coprime")
elif np.gcd.reduce(a)==1:
    print("setwise coprime")
else:
    print("not coprime")
