#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <numeric>
#include <cmath>

#define ll long long int
#define pb push_back
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
using namespace std;

int mx8[] = {0,0,1,-1,-1,1,-1,1};
int my8[] = {-1,1,0,0,-1,-1,1,1};
int mx4[] = {1,-1,0,0};
int my4[] = {0,0,-1,1};
const int MOD = 1000000007;


int main(){
    int n;
    cin >> n;

    vector<int> minFactor(1000005);
    rep(i,1000005){
        for(int j = 2; j * j <= i; j++){
            if(i % j == 0) minFactor[i] = j;
            break;
        }
        if(minFactor[i] == 0) minFactor[i] = i;
    }

    vector<int> a(n);
    int G = a[0];
    rep(i,n) {
        cin >> a[i];
        G = gcd(G,a[i]);
    }
    if(G != 1){cout << "not coprime" << endl; return 0;}

    map<int,int> mp;
    rep(i,n){
        while(a[i] != 1){
            if(mp[minFactor[a[i]]] > 0) {
                cout << "setwise coprime" << endl;
                return 0;
            }
            mp[minFactor[a[i]]]++;
            int A = a[i];
            while(a[i] % minFactor[A] == 0) {
                a[i] = a[i] / minFactor[A];
            }
        }
    }
    cout << "pairwise coprime" << endl;
}