from math import gcd


def main():
    num = int(input())
    array = [int(x) for x in input().split()]
    # INF = 10 ** 7
    # # dp[i][j]: 区間 i ~ j の GCD
    # dp = [[INF] * num for _ in range(num)]
    # dp[0][0] = array[0]
    # while True:
    #     for j in range(num):
    #         for i in range(j):
    #             dp[i][j + 1] = gcd(dp[i][j], array[j + 1])
    # if dp[0][num - 1] == 1:
    #     return 'setwise coprime'

    cop = True
    now_gcd = array[0]
    for n in array[1:]:
        now_gcd = gcd(now_gcd, n)
        if now_gcd != 1:
            cop = False
    if cop:
        return 'pairwise coprime'
    elif now_gcd == 1:
        return 'setwise coprime'
    else:
        return 'not coprime'


if __name__ == '__main__':
    print(main())
