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


int gcd(int a, int b){
  if(a%b == 0){
    return b;
  }else{
    return gcd(b, a%b);
  }
}

int e() {
    int n;
    cin >> n;
    vector<int> v(n);
    for(int i = 0; i < n; i++) cin >> v[i];
    // int maxgcd = INT_MIN;
    int allgcd = -1;
    bool pc = true;
    for(int i = 0; i < n; i++) {
        for(int j = i + 1; j < n; j++) {
            int val = gcd(v[i], v[j]);
            if(val != 1) pc = false;
            if(allgcd == -1) {
                allgcd = val;
            } else {
                allgcd = gcd(allgcd, val);
            }
            if(allgcd == 1) break;
            // maxgcd = max(maxgcd, val);
        }
        if(allgcd == 1) break;
    }
    if(pc) {
        cout << "pairwise coprime" << endl;
    } else if(allgcd == 1) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }

    return 0;
}

