# Date [ 2020-08-29 21:59:01 ]
# Problem [ e.py ]
# Author Koki_tkg

import sys
# import math
# import bisect
# import numpy as np
# from decimal import Decimal
# from numba import njit, i8, u1, b1 #JIT compiler
# from itertools import combinations, product
# from collections import Counter, deque, defaultdict

# sys.setrecursionlimit(10 ** 6)
MOD = 10 ** 9 + 7
INF = 10 ** 9
PI = 3.14159265358979323846

def read_str():      return sys.stdin.readline().strip()
def read_int():      return int(sys.stdin.readline().strip())
def read_ints():     return map(int, sys.stdin.readline().strip().split())
def read_ints2(x):   return map(lambda num: int(num) - x, sys.stdin.readline().strip().split())
def read_str_list(): return list(sys.stdin.readline().strip().split())
def read_int_list(): return list(map(int, sys.stdin.readline().strip().split()))
def GCD(a: int, b: int) -> int: return b if a%b==0 else GCD(b, a%b)
def LCM(a: int, b: int) -> int: return (a * b) // GCD(a, b)

class PrimeFactorization():
    def __init__(self, n):
        self.n = n
        self.prime = [2]
        self.data = [i for i in range(3, self.n+1, 2)]

    def eratosthenes(self):
        p = self.data[0]
        while p*p <= self.n:
            p = self.data[0]
            self.prime.append(p)
            self.data = [e for e in self.data if e % p != 0]
        
        return self.prime + self.data

def Main():
    n = read_int()
    a = read_int_list()
    a.sort()
    if a[-1] < 3:
        prime = [2]
    else:
        p = PrimeFactorization(a[-1])
        prime = p.eratosthenes()
    
    cnt = 0
    for i in range(n):
        if a[i] % 2 == 1:
            cnt += 1
    
    length = len(set(a))
    aa = set(a) & set(prime)
    if set(a) == aa:
        print('pairwise coprime')
    elif length - 1 == len(aa):
        if len(set(a + prime) ^ set(prime)) == 1:
            print('pairwise coprime')
        else:
            print('setwise coprime')
    else:
        if len(aa) > 0 or cnt > 0:
            print('setwise coprime')
        else:
            print('not coprime')

                


if __name__ == '__main__':
    Main()