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


def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a%b)


g = a[0]
for x in a[1:]:
    g = gcd(g, x)

if g > 1:
    print('not coprime')
    exit()


exist = [False] * (10**6+1)
for x in a:
    if x % 2 == 0:
        if exist[2]:
            print('setwise coprime')
            exit()
        while x % 2 == 0:
            x //= 2
        exist[2] = True
    div = 3
    while div * div <= x:
        if x % div == 0:
            if exist[div]:
                print('setwise coprime')
            exit()
            while x % div == 0:
                x //= div
            exist[div] = True
        div += 2
    if x > 1:
        if exist[x]:
            print('setwise coprime')
            exit()
        exist[x] = True
print('pairwise coprime')