# -*- coding: utf-8 -*-
"""
Created on Fri Sep 18 00:26:07 2020

@author: liang
"""

import math
C = 10**6
T = 10**3
N = int(input())
judge = [0]+[False]*C
A =list()
f = False
for a in input().split():
    if judge[int(a)] == True:
        f = True
    judge[int(a)]=True
    A.append(int(a))
d = [False]+[True]*C

#print(judge[:10])
def solve(f):
    #重複時
    if f:
        return "not coprime"
    flag = True
    #エラトステネスの篩 O(N log N)
    for i in range(2,T+1):
        count = 0
        if d[i] == True:
            for j in range(i,C+1,i):
                if judge[j] == True:
                    count += 1
                if count == 2:
                    flag = False
                    break
                d[j] = False
        if not flag:
            break
    
    if flag == True:
        return "pairwise coprime"
    ans = A[0]
    #線形探索 O(N)
    for i in range(0,N):
        ans = math.gcd(ans,A[i])
    if ans == 1:
        return "setwise coprime"
    return "not coprime"

print(solve(f))