import numpy as np
import math
from functools import reduce


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append(i)

    if temp != 1:
        arr.append(temp)

    if arr == []:
        arr.append(n)

    return set(arr)


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


def main():
    N = int(input())
    As = list(map(int, input().split()))
    As = np.array(As)

    ans = 'pairwise coprime'

    for i in range(N - 1):
        Ai = factorization(As[i])
        for j in range(i + 1, N):
            Aj = factorization(As[j])
            judge = Ai & Aj
            if judge != set():
                ans = 'setwise coprime'
                break
        else:
            continue

        break

    if (ans == 'setwise coprime') and (gcd(*As) != 1):
        ans = 'not coprime'

    print(ans)
    return





if __name__ == '__main__':
    main()
