/*
Problem Number: ABC177E
Problem Name: Coprime
Notes: 
*/

#include <bits/stdc++.h>
#define endl "\n"
#define ll long long

using namespace std;

int main(){
    cin.tie(0) -> sync_with_stdio(0);
    
    int n;
    cin >> n;
    int a[n];
    for(int i = 0; i < n; i++)
        cin >> a[i];
    
    int gcd = a[0];
    for(int i = 1; i < n; i++)
        gcd = __gcd(gcd, a[i]);
    if(gcd > 1){
        cout << "not coprime" << endl;
        return 0;
    }

    bool primes[int(1e6)];
    memset(primes, 0, sizeof(primes));
    for(int i = 0; i < n; i++){
        for(int j = 2, ai = a[i]; j <= a[i] && ai != 1; j++)
            if(ai % j == 0){
                if(primes[j]){
                    cout << "setwise coprime" << endl;
                    return 0;
                }
                primes[j] = 1;
                while(ai % j == 0)
                    ai /= j;
            }
    }

    cout << "pairwise coprime" << endl;
    
    return 0;
}