#include <bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;
const int N = 1e6 + 5, mod = 1e9 + 7;

int freq[N];

int main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n;
    cin >> n;
    int g = 0;
    bool found = 0;
    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        g = __gcd(g, x);
        for(int j = 2; j * j <= x; j++){
            int c = 0;
            while(x % j == 0){
                x /= j;
                c++;
            }
            if(c){
                if(freq[j]) found = 1;
                freq[j] = 1;
            }
        }
    }
    if(!found) cout << "pairwise coprime";
    else{
        if(g == 1) cout << "setwise coprime";
        else cout << "not coprime";
    }

    return 0;
}
