#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string.h>
#define s(n)                        scanf("%d",&n)
#define sc(n)                       scanf("%c",&n)
#define sl(n)                       scanf("%I64d",&n)
#define sf(n)                       scanf("%lf",&n)
#define ss(n)                       scanf("%s",n)
#define INF                         (int)1e9
#define EPS                         1e-9
#define bitcount                    __builtin_popcount
#define gcd                         __gcd
#define forall(i,a,b)               for(int i=a;i<b;i++)
#define foreach(v, c)               for( typeof( (c).begin()) v = (c).begin();  v != (c).end(); ++v)
#define all(a)                      a.begin(), a.end()
#define in(a,b)                     ( (b).find(a) != (b).end())
#define pb                          push_back
#define fill(a,v)                    memset(a, v, sizeof a)
#define sz(a)                       ((int)(a.size()))
#define mp                          make_pair
#define MOD                         1000000007
typedef long long ll;
/*For you see , each day i love you
 more.Today more than yesterday
  less than tomorrow.*/
using namespace std;

int main()
{
	int n;s(n);
	vector<int> vec(1000001 , 0);
	vector<int> vecc;
	bool is = true;
	for(int i = 0;i<n;i++)
	{
		int x;s(x);
		vecc.push_back(x);
		if(vec[x]) is = false;
		vec[x] = 1;
	}
	
	vector<int> arr(1000001 , 0);
	for(int i = 2;i<=1000000;i++)
	{
		if(!arr[i])
		{
			int count = 0;
			for(int j = arr[i];j<=1000000;j+=i)
			{
				if(vec[j]) count++;
				arr[j] = 1;
			}
			
			if(count >= 2) is = false;
		}
	}
	
	if(is)
	{
		cout<<"pairwise coprime"<<endl;return 0;
	}
	
	int gcdd = vecc[0];
	
	for(int i = 1;i<n;i++)
	{
		gcdd = __gcd(gcdd , vecc[i]);	
	}
	
	if(gcdd == 1)
	{
		cout<<"setwise coprime"<<endl;	
	}
	else
	{
		cout<<"not coprime"<<endl;
	}
	
	return 0;
}