def judge(a):
    for x, y in itertools.combinations(a, 2):
        if math.gcd(x, y) >= 2:
            break
    else:
        return 'pairwise coprime'

    g = 1
    for i in range(len(a)-1):
        # print(a[i], a[i+1])
        g = math.gcd(g, a[i+1])
        if math.gcd(g, a[i+1]) == 1:
            return 'setwise coprime'
    return 'not coprime'

import math
import itertools

n = int(input())
a = [int(each) for each in input().split()]

print(judge(a))
