//*******Abhijit Burman***********//
//Jalpaiguri Government Engineering College//

// Taken From Striver_79
// Never open a ranklist untill and unless you are done with solving problems, wastes 3/4 minuts 
// Donot treat CP as a placement thing, love it and enjoy it, you will succeed for sure. 


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define mk make_pair
#define MAXX (1000000000000000000+7)
#define mod 1000000007
#define endl "\n"
#define fio ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
void input(ll a[], ll sz) {for(ll i=0;i<sz;i++) cin >> a[i];}
void prll(ll a[], ll sz) {for(ll i=0;i<sz;i++) {if (i == sz - 1) cout << a[i] << "\n"; else cout << a[i] << " ";}}
ll dx1[] = {1, 1, 0, -1, -1, -1, 0, 1};
ll dy1[] = {0, 1, 1, 1, 0, -1, -1, -1};

ll dx2[] = {1, 0, -1, 0};
ll dy2[] = {0, 1, 0, -1};

ll mul(ll a, ll b, ll p = mod) {return ((a % p) * (b % p)) % p;}
ll add(ll a, ll b, ll p = mod) {return (a % p + b % p) % p;}
ll power(ll x,ll y,ll p = mod) 
{ 
    ll res = 1;
    x = x % p;
    while (y > 0) 
    {
        if (y & 1) 
            res = (res*x) % p;
        y = y>>1; // y = y/2 
        x = (x*x) % p; 
    } 
    return res; 
} 
ll modInverse(ll n, ll p = mod)
{
    return power(n, p - 2, p);
}
ll ncrMod(ll n, ll r, ll p = mod)
{
    if (r == 0)
        return 1;
    ll fac[n + 1];
    fac[0] = 1;
    for (ll i = 1 ; i <= n; i++)
        fac[i] = fac[i - 1] * i % p;
    return (fac[n] * modInverse(fac[r], p) % p *
            modInverse(fac[n - r], p) % p) % p;
}
// a+b=xor(a,b)+2*(a&b)//

bool isPrime(ll n){
    for(ll i=2;i*i<=n;i++){
        if(n%i==0){
            return false;
        }
    }
    return true;
}
#define N 1000000+1

ll lpf[N], mobius[N]; 


void cost() 
{ 
    for (ll i = 2; i < N; i++) 

        if (!lpf[i]) 
  
            for (ll j = i; j < N; j += i) 
  
                if (!lpf[j]) 
                    lpf[j] = i; 
} 

void Mobius() 
{ 
    for (ll i = 1; i < N; i++) { 
  
        // If number is one 
        if (i == 1) 
            mobius[i] = 1; 
        else { 
  
            // If number has a squared prime factor 
            if (lpf[i / lpf[i]] == lpf[i]) 
                mobius[i] = 0; 
  
            // Multiply -1 with the previous number 
            else
                mobius[i] = -1 * mobius[i / lpf[i]]; 
        } 
    } 
} 

ll get_gcd_pairs(ll a[], ll n) 
{ 
    // To store maximum number 
    ll maxi = 0; 

    ll fre[N] = { 0 }; 
  
    for (ll i = 0; i < n; i++) { 
        fre[a[i]]++; 
        maxi = max(a[i], maxi); 
    } 
  
    cost(); 
    Mobius(); 

    ll ans = 0; 
  
    for (ll i = 1; i <= maxi; i++) { 
        if (!mobius[i]) 
            continue; 
  
        ll temp = 0; 
        for (ll j = i; j <= maxi; j += i) 
            temp += fre[j]; 

        ans += temp * (temp - 1) / 2 * mobius[i]; 
    } 
    return ans; 
}
void solve()
{
    ll n;
    cin>>n;
    ll a[n];
    input(a,n);
    
    ll temp = get_gcd_pairs(a,n);
    // cout<<temp<<endl;
    if(temp==(n*(n-1)/2)){
        cout<<"pairwise coprime"<<endl;
    }
    else{
        ll res =a[0];
        for(int i=1;i<n;i++){
            res=__gcd(res,a[i]);
        }
        if(res==1){
            cout<<"setwise coprime"<<endl;
        }
        else{
            cout<<"not coprime"<<endl;
        }
    }
}


int main()
{
	fio;
// 	#ifndef ONLINE_JUDGE
//     // for getting input from input.txt
//     freopen("input.txt", "r", stdin);
//     // for writing output to output.txt
//     freopen("output.txt", "w", stdout);
// 	#endif
 

	ll t=1;
// 	cin>>t;
	while(t--)
	{
		solve();
	}
	return 0;
}

Measured memory_bytes: 34820