import math 
from functools import reduce

def read():
    N = int(input()) 
    As = list(map(int, input().split(' ')))
    return N, As


def func(N, As):
    for i in range(N):
        ai = As[i]
        for j in range(i+1, N):
            aj = As[j]
            if math.gcd(ai, aj) != 1:
                if reduce(math.gcd, As) == 1:
                    print('setwise coprime')
                else:
                    print('not coprime')
                return
    print('pairwise coprime')
    return


if __name__ == '__main__':
    N, As = read()
    func(N, As)
