#include<bits/stdc++.h>
#define M_PI       3.14159265358979323846
#define Speed_UP  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define 	pb	push_back 
#define 	ff	first 
#define 	ss	second 
#define sz(x) (int)x.size()
#warning Remeber to change t
using namespace std;
typedef long long ll;
inline void setIO(string name="") {
	#ifndef ONLINE_JUDGE 
	freopen((name+".in").c_str(), "r", stdin); 
	freopen((name+".out").c_str(), "w", stdout);
	#endif
	}

  ll modInverse(ll a, ll m) 
{ 
    ll m0 = m; 
    ll y = 0, x = 1; 
  
    if (m == 1) 
      return 0; 
  
    while (a > 1) 
    { 
        // q is quotient 
        ll q = a / m; 
        ll t = m; 
  
        // m is remainder now, process same as 
        // Euclid's algo 
        m = a % m, a = t; 
        t = y; 
  
        // Update y and x 
        y = x - q * y; 
        x = t; 
    } 
  
    // Make x positive 
    if (x < 0) 
       x += m0; 
  
    return x; 
} 
ll const M=1e9+7;
int main(){
	Speed_UP
	ll t;
	t=1;
	while(t--){
    ll n;
    cin>>n;
    ll arr[n];
    for(int i=0;i<n;i++)
      cin>>arr[i];
    ll pr=1;
    for(int i=0;i<n;i++){
      pr*=arr[i]%M;
      pr%=M;
    }
    ll st=arr[0];
    for(int i=1;i<n;i++){
      st=(st%M*arr[i]%M)*modInverse(__gcd(st,arr[i]),M);
    }
    ll g=arr[0];
    for(int i=1;i<n;i++){
      g=__gcd(g,arr[i]);
    }
    if(pr%M==st%M)
      cout<<"pairwise coprime";
    else if(g==1)
      cout<<"setwise coprime";
    else
      cout<<"not coprime";
		
		
		
	}





}
