#include <bits/stdc++.h>
using namespace std;

#define rep(i,a,b) for(int i=a;i<b;i++)
#define pb push_back
#define PII pair<int,int>
#define INF LONG_MAX
#define ull unsigned long long
#define long long long
#define PIL pair<long,int>
#define M 1000000007
#define endl "\n"

void fastIO() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

}

  
bool pairWise(int arr[], int n) 
{        
    int count = 0;  
    for (int i = 0; i < n - 1; i++)  
    {   
         for (int j = i + 1; j < n; j++){ 
            
            if (__gcd(arr[i], arr[j])!=1) 
                return false; 
        }
    }             
    return true; 
} 

int main()
{
	fastIO();
    int n;
    cin>>n;
    int ar[n];
    for(int i=0;i<n;i++){
        cin>>ar[i];
    }
    if(pairWise(ar,n)){
        cout<<"pairwise coprime";
        return 0;
    }
    int allgcd =ar[0] ;
    for(int i= 1;i<n;i++){
        allgcd = __gcd(allgcd,ar[i]);
    }
    
    if(allgcd ==1 ){
        cout<<"setwise coprime";
    }else {
        cout<<"not coprime";
    }
    
}

