from collections import defaultdict



N = int(eval(input()))

A = list(map(int, input().split()))



INF = 10**6



def min_primes(n):

  ret = [i for i in range(n+1)]

  for i in range(2, int(n**0.5)+1):

    if ret[i] < i:

      continue

    for j in range(i, n+1, i):

      ret[j] = min(i, ret[j])

  return ret



D = min_primes(INF)

Ps = defaultdict(int)



def fact(x):

  Ps[D[x]] += 1

  pre = x

  x //= D[x]

  while x > 1:

    if D[x] > D[pre]:

      Ps[D[x]] += 1

    pre = x

    x //= D[x]



for a in A:

  fact(a)



Ps[1] = 1

ans = max(Ps.values())



if ans == N:

  print("not coprime")

elif ans == 1:

  print("pairwise coprime")

else:

  print("setwise coprime")
import math

import sys

input = sys.stdin.readline



N = int(eval(input()))

A = list(map(int, input().split()))

Nums = [0]*(10**6 + 1)



for a in A:

  Nums[a] += 1



GCD = A[0]

for i in range(N-1):

  GCD = math.gcd(GCD, A[i+1])



if GCD != 1:

  print("not coprime")

else:

  for d in range(2, 10**6+1):

    cnt = sum(Nums[d::d])

    if cnt > 1:

      print("setwise coprime")

      exit()

  print("pairwise coprime")
from collections import defaultdict

N = int(eval(input()))
A = list(map(int, input().split()))
INF = 10**6


def min_primes(n):
    ret = [i for i in range(n + 1)]
    for i in range(2, int(n**0.5) + 1):
        if ret[i] < i:
            continue
        for j in range(i, n + 1, i):
            ret[j] = min(i, ret[j])
    return ret


D = min_primes(INF)
Ps = defaultdict(int)


def fact(x):
    Ps[D[x]] += 1
    pre = x
    x //= D[x]
    while x > 1:
        if D[x] > D[pre]:
            Ps[D[x]] += 1
        pre = x
        x //= D[x]


for a in A:
    fact(a)
Ps[1] = 1
ans = max(Ps.values())
if ans == N:
    print("not coprime")
elif ans == 1:
    print("pairwise coprime")
else:
    print("setwise coprime")

import math
import sys

input = sys.stdin.readline
N = int(eval(input()))
A = list(map(int, input().split()))
Nums = [0] * (10**6 + 1)
for a in A:
    Nums[a] += 1
GCD = A[0]
for i in range(N - 1):
    GCD = math.gcd(GCD, A[i + 1])
if GCD != 1:
    print("not coprime")
else:
    for d in range(2, 10**6 + 1):
        cnt = sum(Nums[d::d])
        if cnt > 1:
            print("setwise coprime")
            exit()
    print("pairwise coprime")

-from collections import defaultdict +import math +import sys +input = sys.stdin.readline -INF = 10**6 - - -def min_primes(n): -    ret = [i for i in range(n + 1)] -    for i in range(2, int(n**0.5) + 1): -        if ret[i] < i: -            continue -        for j in range(i, n + 1, i): -            ret[j] = min(i, ret[j]) -    return ret - - -D = min_primes(INF) -Ps = defaultdict(int) - - -def fact(x): -    Ps[D[x]] += 1 -    pre = x -    x //= D[x] -    while x > 1: -        if D[x] > D[pre]: -            Ps[D[x]] += 1 -        pre = x -        x //= D[x] - - +Nums = [0] * (10**6 + 1) -    fact(a) -Ps[1] = 1 -ans = max(Ps.values()) -if ans == N: +    Nums[a] += 1 +GCD = A[0] +for i in range(N - 1): +    GCD = math.gcd(GCD, A[i + 1]) +if GCD != 1: -elif ans == 1: +else: +    for d in range(2, 10**6 + 1): +        cnt = sum(Nums[d::d]) +        if cnt > 1: +            print("setwise coprime") +            exit() -else: -    print("setwise coprime")