def gcd(a, b):
    # c += 1
    # if c > 100:
    #     return 100;
    # print(c, a, b)
    if a < b:
        a, b = b, a
    if b == 0:
        return a;
    return gcd(b, a - b)

# test1 = gcd(40, 20, 1)
# test2 = gcd(60, 40, 1)
# test3 = gcd(50, 3, 1)

# print(test1, test2, test3)

def f(n, ais):
    common_divisor = ais[0]
    for (i, ai) in enumerate(ais):
        common_divisor = gcd(ai, common_divisor)
        for (j, aj) in enumerate(ais[i+1:]):
            if gcd(ai, aj) != 1:
                for ai in ais[i+1:]:
                    common_divisor = gcd(ai, common_divisor)
                if common_divisor == 1:
                    return 'setwise coprime'
                else:
                    return 'not coprime'
        # print(common_divisor)
    return 'pairwise coprime'

# def test(n, ais):
#     print('n={}, ais={}, result={}'.format(n, ais, f(n, ais)))

# test(2, [6, 6])
# test(3, [4, 7, 3])
# test(3, [2, 3, 4])
# test(3, [2, 4, 6])

# test(3, [3, 4, 5])
# test(3, [6, 10, 15])
# test(3, [6, 10, 16])

# test(2, [100, 1])
# test(3, [8, 1, 800])
n = int(input())
ais = list(map(int, input().split(' ')))
print(f(n, ais))
