#include<bits/stdc++.h>
using namespace std;
#define fl(n)             for(long long int i=0;i<n;i++)
#define sz(a)             int((a).size())
#define tr(c,i)           for(auto i = (c).begin(); i != (c).end(); i++)
#define trr(c,i)          for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define present(c,x)      ((c).find(x) != (c).end())
#define cpresent(c,x)     (find(all(c),x) != (c).end())
#define vi                vector <int>
#define vvi               vector < vi >
#define pb                push_back
#define all(x)            (x).begin(),(x).end()
#define ll                long long
#define fr                first
#define sc                second
#define vc                vector
#define pii               pair<int,int>
#define msi               map<string,int> 
#define mii               map<int,int>
#define psi               pair<string,int>
#define pis               pair<int,string>
#define M                 1000000007LL

bool setwise=0;

ll gcd(ll a, ll b)
{
	if(b==0)
		return a;
	return gcd(b,a%b);
}


const int MAX = 1000000;
int B[MAX + 1]{};
 

    bool flag1 = true;
    bool flag2 = true;
    for (int i = 2; i <= MAX; i++) {
        int cnt = 0;
        for (int j = 1; j < MAX; j++) {
            if (i * j > MAX) break;
            cnt += B[i * j];
        }
        if (cnt > 1) {
            flag1 = false;
        }
        if (cnt == N) {
            flag2 = false;
        }
    }
    if (flag1) {
        cout << "pairwise coprime\n";
    } 



int solve()
{
	int n;
	cin>>n;
	ll a[n],tot=1;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		B[a[i]]++;
		tot*=a[i];
	}

	
	ll lcm=a[0],g=a[0];
	for(int i=1;i<n;i++)
	{
		g=gcd(g,a[i]);
		lcm=(a[i]*lcm)/gcd(lcm,a[i]);
	}
	bool flag1 = true;
    bool flag2 = true;
    for (int i = 2; i <= MAX; i++) {
        int cnt = 0;
        for (int j = 1; j < MAX; j++) {
            if (i * j > MAX) break;
            cnt += B[i * j];
        }
        if (cnt > 1) {
            flag1 = false;
        }
        if (cnt == N) {
            flag2 = false;
        }
    }
    if (flag1) {
        cout << "pairwise coprime\n";
    } 
	else if(g==1)
		cout<<"setwise coprime";
	else
	cout<<"not coprime\n";



  return 0;
}


int main() {
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
  
  int t=1;
  //cin>>t;
  while(t--)
  {
    solve();
  }
  return 0;
}

 
