import math
from functools import reduce


def solve(N, As):
    for i in range(N - 1):
        for j in range(N - i - 1):
            gcd = math.gcd(As[i], As[i + j + 1])
            if gcd > 1:
                if reduce(math.gcd, As) == 1:
                    print('setwise coprime')
                else:
                    print('not coprime')
                exit(0)
    print('pairwise coprime')


if __name__ == "__main__":
    N = int(input())
    As = list(map(int, input().split()))
    solve(N, As)
