from math import gcd
from itertools import combinations
from functools import reduce

def mult_gcd(arr):
    return reduce(gcd, arr)

def main(N, A):
    for c in combinations(A, r = 2):
        if gcd(*c) != 1:
            break
    else:
        print('pairwise coprime')
        exit()

    if mult_gcd(A) == 1:
        print('setwise coprime')
    else:
        print('not coprime')

if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))
    main(N, A)