# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools

def gcd(m,n):
  x = max(m,n)
  y = min(m,n)
  if x%y == 0:
    return y
  else:
    while x%y != 0:
      z = x%y
      x = y
      y = z
    else:
      return z

sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]

N = int(input())
A = [int(i) for i in input().split()]
ans = 0
set = A[0]
pair = a = A[0]

for i in range(N-1):
    pair = gcd(a,A[i+1])
    a=a*A[i+1]
    if(pair!=1):
        break

for i in range(N-1):
    set = gcd(set,A[i+1])

if(pair == 1):
    print("pairwise coprime")
elif(set == 1):
    print("setwise coprime")
else:
    print("not coprime")
