import math

n = int(input().rstrip())
a = list(map(int,input().rstrip().split()))
pgcd = True
sgcd = a[n-1]

for i in range(0,n-1):
    sgcd = math.gcd(sgcd, a[i])
    if sgcd==1:
        break
if sgcd!=1:
    print('not coprime')
else:
    for i in range(0,n-1):
        sgcd = math.gcd(sgcd, a[i])    
        for j in range(i+1,n):
            if math.gcd(a[i], a[j]) != 1:
                print('setwise coprime')
                break
        else:
            continue
        break
    else:
        print('pairwise coprime')