using System;
using System.Collections.Generic;
using System.Text;

class Program
{
	static void Main(string[] args)
	{
		string[] input = Read();
		int n = int.Parse(input[0]);
		input = Read();
		int[] a = new int[n];
		PrimeFactCalc pfc = new PrimeFactCalc();
		Dictionary<int,int>[] dicts = new Dictionary<int,int>[n];
		for(int i=0; i<n; i++)
		{
			a[i] = int.Parse(input[i]);
			dicts[i] = pfc.GetPrimeFactDictionary(a[i]);
		}
		if(pfc.GetGCFDictionary(dicts).Count > 0)
		{
			Write("not coprime");
		}
		else
		{
			Dictionary<int,int> lcm = pfc.GetLCMDictionary(dicts);
			Dictionary<int,int> ap = pfc.GetAPDictionary(dicts);
			bool pc = true;
			foreach(var pair in lcm)
			{
				pc = ap.ContainsKey(pair.Key) && ap[pair.Key] == pair.Value;
				if(!pc) break;
			}
			if(pc) Write("pairwise coprime");
			else Write("setwise coprime");
		}
	}

	static string[] Read()
	{
		return Console.ReadLine().Split(' ');
	}

	static void Write(object o)
	{
		Console.WriteLine(o.ToString());
	}
}


public class FactorialCalc
{
	private long _mod;
	private int _comMax;

	public long[] ArrFac {get; set;}
	public long[] ArrFacInv {get; set;}
	public long[] ArrInv {get; set;}

	public FactorialCalc(long mod = 1, int comMax = 200000)
	{
		_mod = mod;
		_comMax = comMax;
		InitArray();
	}

	public void InitArray()
	{
		if(_mod == 0 || _comMax < 2) return;
		ArrFac = new long[_comMax];
		ArrFacInv = new long[_comMax];
		ArrInv = new long[_comMax];

		ArrFac[0] = 1; ArrFac[1] = 1;
		ArrFacInv[0] = 1; ArrFacInv[1] = 1;
		ArrInv[0] = 0; ArrInv[1] = 1;
		for(int i = 2; i < _comMax; i++)
		{
			ArrFac[i] = ArrFac[i-1] * (long)i % _mod;
			ArrInv[i] = _mod - ArrInv[(int)(_mod%(long)i)] * (_mod / (long)i) % _mod;
			ArrFacInv[i] = ArrFacInv[i-1] * ArrInv[i] % _mod; 
		}
	}

	public long Permutation(int n, int r)
	{
		if(n < 0 || r < 0 || n < r) return 0;
		return ArrFac[n] * ArrFacInv[n-r] % _mod;
	}

	public long Combination(int n, int r)
	{
		if(n < 0 || r < 0 || n < r) return 0;
		return ArrFac[n] * (ArrFacInv[r] * ArrFacInv[n-r] % _mod) % _mod;
	}

}

public class PrimeFactCalc
{
	private int _nMax;
	private long _mod;

	public int[] ArrSPF {get; set;}

	public PrimeFactCalc(int nMax = 1000000, long mod = 1)
	{
		_nMax = nMax;
		_mod = mod;
		InitArray();
	}

	public void InitArray()
	{
		ArrSPF = new int[_nMax+1];
		for(int i = 0; i <= _nMax; i++) ArrSPF[i] = i;
		for(int i = 2; i * i <= _nMax; i++)
		{
			if(ArrSPF[i]==i)
			{
				for(int j = i * i; j <= _nMax; j += i)
				{
					if(ArrSPF[j]==j) ArrSPF[j] = i;
				}
			}
		}
	}

	public Dictionary<int, int> GetPrimeFactDictionary(int n)
	{
		Dictionary<int, int> ret = new Dictionary<int, int>();
		while(n != 1)
		{
			int pf = ArrSPF[n];
			if(ret.ContainsKey(pf)) ret[pf]++;
			else ret.Add(pf, 1);
			n /= pf;
		}
		return ret;
	}

	public int GetMultiples(Dictionary<int, int> dict)
	{
		long ret = 1;
		foreach(var pair in dict)
		{
			for(int i = 0; i < pair.Value; i++) ret = ret * (long)pair.Key % _mod;
		}
		return (int)ret;
	}

	public Dictionary<int, int> GetLCMDictionary(Dictionary<int, int>[] dictArrPf)
	{
		if(dictArrPf.Length < 1) return new Dictionary<int, int>();
		Dictionary<int, int> ret = new Dictionary<int, int>(dictArrPf[0]);
		for(int i = 1; i < dictArrPf.Length; i++) CalcLCM(ret, dictArrPf[i]);
		return ret;
	}

	public void CalcLCM(Dictionary<int, int> dictBase, Dictionary<int, int> dictAdd)
	{
		foreach(var pair in dictAdd)
		{
			if(dictBase.ContainsKey(pair.Key))
			{
				if(dictBase[pair.Key] < pair.Value) dictBase[pair.Key] = pair.Value;
			}
			else
			{
				dictBase.Add(pair.Key, pair.Value);
			}
		}
	}

	public Dictionary<int, int> GetGCFDictionary(Dictionary<int, int>[] dictArrPf)
	{
		if(dictArrPf.Length < 1) return new Dictionary<int, int>();
		Dictionary<int, int> ret = new Dictionary<int, int>(dictArrPf[0]);
		for(int i = 1; i < dictArrPf.Length; i++) CalcGCF(ret, dictArrPf[i]);
		return ret;
	}

	public void CalcGCF(Dictionary<int, int> dictBase, Dictionary<int, int> dictRemove)
	{
		List<int> listBaseKeys = new List<int>(dictBase.Keys);
		foreach(int key in listBaseKeys)
		{
			if(dictRemove.ContainsKey(key))
			{
				if(dictRemove[key] < dictBase[key]) dictBase[key] = dictRemove[key]; 
			}
			else
			{
				dictBase.Remove(key);
			}
		}
	}

	public Dictionary<int, int> GetAPDictionary(Dictionary<int, int>[] dictArrPf)
	{
		if(dictArrPf.Length < 1) return new Dictionary<int, int>();
		Dictionary<int, int> ret = new Dictionary<int, int>(dictArrPf[0]);
		for(int i = 1; i < dictArrPf.Length; i++) CalcAP(ret, dictArrPf[i]);
		return ret;
	}

	public void CalcAP(Dictionary<int, int> dictBase, Dictionary<int, int> dictAdd)
	{
		foreach(var pair in dictAdd)
		{
			if(dictBase.ContainsKey(pair.Key))
			{
				dictBase[pair.Key] += pair.Value;
			}
			else
			{
				dictBase.Add(pair.Key, pair.Value);
			}
		}
	}


}




Measured memory_bytes: 473172