import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def prime_factor(n):
    res = []
    for i in range(2,int(n**0.5)+1):
        while n%i==0: res.append(i); n //= i
    if n != 1: res.append(n)
    return res
from functools import reduce
#======================================================#
def main():
    n = II()
    aa = MII()
    head_prime = prime_factor(aa[0])

    pw_flag = True
    nc_flag = True
    for a in aa[1:]:
        nc_tmp = False
        for p in head_prime:
            if a%p == 0:
                nc_tmp = True
                pw_flag = False
        nc_flag &= nc_tmp

    if nc_flag and reduce(gcd, aa) == 1:
        print('setwise coprime')
    elif nc_flag:
        print('not coprime')
    else:
        print('pairwise coprime')


if __name__ == '__main__':
    main()