from math import gcd
import sys
sys.setrecursionlimit(1000000)

def main():
    N = int(input())
    A = list(map(int, input().split()))
    tmp = gcd(A[0],A[1])
    set_A = set(A)
    for i in range(2,N):
        tmp = gcd(tmp, A[i])

    if tmp != 1:
        print('not coprime')
        exit()
    max_A = max(A)
    ans = [0] * (max_A + 1)
    ans = [set() for _ in range(max_A + 1)]
    flag = True
    for i in range(2,int(max_A ** 0.5) +1):
        tmp = 1
        b = 0
        c = set()
        while b <= max_A:
            b = i * tmp
            if {b} & set_A:
                c.add(b)
            if len(c) >= 2:
                flag = False
                break
            if b > max_A:
                break
            ans[b].add(i)
            tmp += 1
    if flag:
        print('pairwise coprime')
    else:
        print('setwise coprime')
    






if __name__ == "__main__":
    main()