// Author: Moulik
// Date Created: 30 August 2020
// Filename: AT177E.cpp
#include <bits/stdc++.h>
using namespace std;
#ifdef _DEBUG
#define what_is(x) cerr << "DEBUG::BEGIN\n\tVariable name:\n\t\t" << #x << "\n\tdata:\n\t\t" << x << "\nDEBUG::END" << endl;
#else
#define what_is(x) ;
#endif

// CUSTOM FUNCTIONS

// Power using binary exponentation
long long power(long long base, int exponent){ 
    long long ans = 1;
    while(exponent > 0){ 
        if (exponent&1) 
            ans = (ans*base); 
        exponent >>= 1;
        base = base*base;
    }
    return ans; 
} 

// Power modulo p using binary exponentation
long long power(long long base, int exponent, int p){ 
    long long ans = 1;
    base = base%p;
    while(exponent > 0){ 
        if (exponent&1) 
            ans = (ans*base)%p; 
        exponent >>= 1;
        base = (base * base) % p; 
    } 
    return ans; 
}

// Return n^-1%p, given p is prime
int modInverse(int n, int p){
    return power(n,p-2,p);
}

// calculates factorial from 0 to n (inclusive)
void factorialCalc(vector<int> & factorial, int n){
    if(factorial.size()!=n+1){factorial.resize(n+1);}
    factorial[0]=1;
    factorial[1]=1;
    for(int i = 2; i <=n; i++){
        factorial[i] = factorial[i-1]*i;
    }
}

// calculates factorial mod p from 0 to n (inclusive) 
void factorialCalc(vector<int> & factorial, int n, int p){
    if(factorial.size()!=n+1){factorial.resize(n+1);}
    factorial[0]=1;
    factorial[1]=1;
    for(int i = 2; i <=n; i++){
        factorial[i] = (factorial[i-1]*1ll*i)%(p);
    }
}

// calculates nCr mod p, using fermats method, given p is prime.
unsigned long long nCr(unsigned long long n, int r, int p, vector<int> & fac){ 
    if (r == 0) 
        return 1; 
    return (1ll*fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) % p; 
}

// Sorts array in the given order {key is 0 indexed}
template <typename T>
void keySort(vector<T> &arr, vector<int> &key){
    int n = arr.size();
    if(key.size()!=n){
        throw runtime_error("Size of data array not equals to size of key array");
    }
    vector<T> ans(n);
    int ar[n];
    for(int i = 0; i < n; i++){
        ar[key[i]]=i;
    }
    for(int i = 0; i < n; i++){
        ans[i] = arr[ar[i]];
    }
    arr = ans;
}

#define rprint(data) std::cout << data;return  
#define rprintln(data) std::cout << data << endl;return  

#define selfMin(x, y) x=std::min(x,y);
#define selfMax(x, y) x=std::max(x,y);

// OSTREAMS

template<typename T1, typename T2>
ostream & operator<<(ostream &os, const pair<T1,T2> p){
    os << '(' << p.first << ',' << p.second << ')';
    return os;
}

template<typename T>
ostream & operator<<(ostream &os, const vector<T> p){
    os << "{ ";
    for(auto i:p){
        os << i << ",";
    }
    os << "\b";
    os << "}";
    return os;
}

// ISTREAMS

template<typename T1, typename T2>
istream & operator >> (istream &in, pair<T1,T2> & p){
    in >> p.first >> p.second;
    return in;
}

void solve();

int main(){
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    solve();
    return 0;
}


void solve(){
    int n;
    cin >> n;
    vector<int> primes(1e6+2, -1);
    for(int i = 2; i < 1e6+2; i++){
        if(primes[i]!=-1){
            continue;
        }
        for(int j = i; j < 1e6+2; j+=i){
            primes[j] = i;
        }
    }
    vector<int> factorSet(1e6+2,0);
    bool pairwise = true;
    vector<int> vc(n);
    for(int i = 0; i < n; i++){
        cin >> vc[i];
        int tmp = vc[i];
        while(tmp != 1){
            int div = primes[tmp];
            while(tmp%div==0){
                tmp/=div;
            }
            factorSet[div]++;
            if(factorSet[div]==2){pairwise=false;}
        }
    }
    int gcd = vc[0];
    for(auto i:vc){
        gcd = __gcd(i,gcd);
    }
    if(gcd!=1){rprintln("not coprime");}
    if(!pairwise){rprintln("setwise coprime");}
    rprintln("pairwise coprime");
}


Measured memory_bytes: 15016