#include <bits/stdc++.h>
          
#define pb push_back
#define ll long long
#define f first
#define s second
#define ld long double
#define fa fflush(stdout); 
#define mp make_pair
using namespace std;
void data() {
    #ifdef NURS
        freopen("main.in", "r", stdin);
        freopen("main.out", "w", stdout);
    #endif
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);;                                                      
} 
int dx[5] = {-1, 0, 0, 1};
int dy[5] = {0, -1, 1, 0};
  
const int N = 1e6 + 100;
const ll mod = 1e9 + 7;
const ll big = 1e9;

int was[N];  
int main() 
{
    data();      
    int n;
    cin >> n;
    int a[n + 1];
    int gcd = 0;
    for (int i = 1; i <= n; i++)
    {
    	cin >> a[i];
    	was[a[i]]++;
    	gcd = __gcd(a[i], gcd);
    }
    int ok = 0;
    for (int i = 2; i <= 1e6; i++)
    {
    	if (was[i] >= 2)
    	{
    		ok = 1;
    	}
    	int kol = 0;
    	for (int j = i + i; j <= 1e6; j += i)
    	{
    		if (was[j])
    		{
    			kol++;
    		}
       	}
    	if (kol + was[i] > 0)
    	{
    		ok = 1;
    	}
    }
    //cout << ok << '\n';
    if (ok == 0)
    {
    	cout << "pairwise coprime ";
    }
    else if (gcd == 1)
    {
    	cout << "setwise coprime ";
    }
    else if (ok == 1 && gcd > 1)
    {
    	cout << "not coprime";
    }
}
//a[3] * (a[1] + a[2]