from math import gcd
from functools import reduce
N = int(input())
*A, = map(int, input().split())

def lcm(a, b):
    return a*b//gcd(a,b)

g = 1
for a in A:
    if lcm(g, a) == g * a:
        g *= a
    else:
        if reduce(gcd, A) == 1:
            print("setwise coprime")
        else:
            print('not coprime')
        break
else:
    print('pairwise coprime')
    exit()