#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
const unsigned int M = 1000000007;
  
// To compute x^y under modulo m 
int power(int x, unsigned int y, unsigned int m) 
{ 
    if (y == 0) 
        return 1; 
    int p = power(x, y/2, m) % m; 
    p = (p * p) % m; 
  
    return (y%2 == 0)? p : (x * p) % m; 
} 

int modInverse(int a, int m) 
{ 
    int g = __gcd(a, m); 
    if (g != 1) 
        return 0; 
    else
    { 
        // If a and m are relatively prime, then modulo inverse 
        // is a^(m-2) mode m 
        return power(a, m-2, m); 
    } 
} 


int32_t main(){
    #ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    int a[n],g,pr=1;
    for(int i=0;i<n;i++){
    	cin>>a[i];
    	pr = (pr%M * a[i]%M)%M;
    }
    g=a[0];
    for(int i=1;i<n;i++){
    	g = __gcd(g,a[i]);
    }
    int l=a[0];
    for(int i=1;i<n;i++){
    	int tmp = __gcd(l,a[i]);
    	int tmp1 = modInverse(tmp,M);
    	l = ((l%M)*(a[i]%M)*(tmp1%M))%M;
    }
    if(pr==l){
    	cout<<"pairwise coprime";
    }
    else if(g==1){
    	cout<<"setwise coprime";
    }
    else{
    	cout<<"not coprime";
    }
    return 0;
}
