import sys
#import time
from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
import heapq
#import math
import itertools
import numpy as np
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))

n = ri()
a = rl()
max_a = max(a)
for i in range(2, int(max_a**(1/2))+1):
    cnt=0
    for e in a:
        if e%i == 0:
            cnt+=1
    if cnt==n:
        print('not coprime')
        sys.exit()
    elif cnt>1:
        print('setwise coprime')
        sys.exit()
print("pairwise coprime")