from math import gcd
from functools import reduce


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

    if not reduce(gcd, As) == 1:
        print('not coprime')
    else:
        flag = True
        for i in range(len(As) - 1):
            for j in range(i + 1, len(As)):
                if not gcd(As[i], As[i + 1]) == 1:
                    flag = False
                    break
            if not flag:
                break
        if flag:
            print('pairwise coprime')
        else:
            print('setwise coprime')


if __name__ == '__main__':
    main()