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

typedef long long int ll;

int main(){

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int m;
    cin>>m;

    unordered_map<int,int>mp;

    vector<int>v(m);
    for(int &x:v)cin>>x,mp[x]++;

     int g = __gcd(v[0],v[1]);

     for(int i = 2; i < m ; i++){
         g = __gcd(g,v[i]);
     }

     if(g > 1){
         cout<<"not coprime";
         return 0;
     }

    int n = 1000000;
    vector<char> is_prime(n+1, true);
    is_prime[0] = is_prime[1] = false;

    vector<int>res(n+1,0);

    for (int i = 2; i * i <= n; i++) {

        if (is_prime[i]) {

            for (int j = 0; j <= n; j += i){
                is_prime[j] = false;

                if(mp[j])res[i] += mp[j];

            }
        }
    }

    int c = 0;

    for(int i = 1; i <= n ; i++){
        if(res[i] > 1)c++;
    }

    if(c){
        cout<<"setwise coprime";
        return 0;
    }

    cout<<"pairwise coprime";

    return 0;

}

