check_list = [0]*1000010
conf = False

def test_prime(m):
    global check_list
    global conf
    for i in range(2,int(m**0.5)+1):
        if m % i == 0:
            if check_list[i] >= 1:
                conf = True
            check_list[i] += 1

def main():
    N = int(input())
    A = list(map(int, input().split()))
    for i in range(len(A)):
        test_prime(A[i])
    if max(check_list) == len(A):
        return "not coprime"
    else:
        if conf:
            return "setwise coprime"
        else:
            return "pairwise coprime"

if __name__ == '__main__':
    print(main())