from math import gcd


def main():
    n = int(input())
    a = list(map(int, input().split()))
    ac_gcd = [a[-1] for _ in range(n)]
    for i in range(n - 2, -1, -1):
        ac_gcd[i] = gcd(a[i], ac_gcd[i + 1])
    if set(ac_gcd[:-1]) == {1}:
        print("pairwise coprime")
    elif ac_gcd[0] == 1:
        print("setwise coprime")
    else:
        print("not coprime")


if __name__ == '__main__':
    main()
