using System;
using System.Collections.Generic;
class Program
{
	static void Main(string[] args)
	{
		int N = int.Parse(Console.ReadLine());
		string[] str = Console.ReadLine().Split();
		int[]A = new int[N];
		var dic = new Dictionary<int,int>();
		bool flag1 = true;
		for(var i=0;i<N;i++){
			A[i] = int.Parse(str[i]);
			var list = PrimeFactors(A[i]);
			foreach(var j in list){
				if(dic.ContainsKey(j)){
					dic[j]++;
					if(dic[j]>=2){
						flag1 = false;
						break;
					}
				} else {
					dic[j] = 1;
				}
			}
		}
		bool flag = true;
		foreach(var i in dic.Keys){
			if(dic[i]>=2){
				flag = false;
			}
		}
		if(flag){
			Console.WriteLine("pairwise coprime");
		} else {
			int d = A[0];
			for(var i=1;i<N;i++){
				d = Gcd(d,A[i]);
			}
			if(d==1){
				Console.WriteLine("setwise coprime");
			} else {
				Console.WriteLine("not coprime");
			}
		}
	}
	public static int Gcd(int a, int b) {
		if (a < b)
			return Gcd(b, a);
		while (b != 0) {
			var r = a % b;
			a = b;
			b = r;
		}
		return a;
	}
	public static HashSet<int> PrimeFactors(int n){
		int i = 2;
		int tmp = n;
		var list = new HashSet<int>();
		while(i*i<=n){
			if(tmp%i==0){
				tmp /= i;
				list.Add(i);
			} else {
				i++;
			}
		}
		if(tmp != 1){
			list.Add(tmp);
		}
		return list;
	}
}