import sys
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)


def gcd_list(numbers):
    return reduce(math.gcd, numbers)


def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))
    a.sort()
    if gcd_list(a) != 1:
        print("not coprime")
    else:
        a = set(a)
        ans = False
        for i in range(2, 10 ** 3 + 1):
            checked = False
            for j in range(i, 10 ** 6 + 1, i):
                if j in a:
                    if checked == True:
                        ans = True
                    else:
                        checked = True
        print("setwise coprime" if ans else "pairwise coprime")


if __name__ == "__main__":
    main()
