def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr

def main():
  n = int(input())
  arr = list(map(int, input().split()))
  dp = [0]*(max(arr)+1)
  is_pair = True
  is_set = True

  for a in arr:
    primes = factorization(a)
    for p in primes:
      dp[p] += 1

  max_dp = max(dp)
  if max_dp == 1:
    print('pairwise coprime')
  elif max_dp == n:
    print('not coprime')
  else:
    print('setwise coprime')
  
main()