import math
N = int(input())
Alst = list(map(int, input().split()))
l = len(Alst)

k = Alst[0]
for i in range(1, l):
    k = math.gcd(k, Alst[i])

if k == 1: 
    c = False
    for i in range(l):
        for j in range(i+1, l):
            k = math.gcd(Alst[i], Alst[j])
            if k != 1:
                c = True
                break
        if c:
            break

    if c:
        print('setwise coprime')

    else:
        print('pairwise coprime')

else:
    print('not coprime')
