#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <queue>
#include <tuple>
#include <set>
#include <map>

using namespace std;

vector< bool > prime_table(int n) {
  vector< bool > prime(n + 1, true);
  if(n >= 0) prime[0] = false;
  if(n >= 1) prime[1] = false;
  for(int i = 2; i * i <= n; i++) {
    if(!prime[i]) continue;
    for(int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}


int main(void) {
    int N;
    cin >> N;
    vector<int> A(N);
    for(int i=0; i<N; i++) {
        cin >> A[i];
    }

    auto table = prime_table(1000000);
    bool pair = false;
    for(int k=1; k<=1000000; k++) {
        if(!table[k]) continue;
        bool flag = false;
        for(int i=0; i<N; i++) {
            if(flag && A[i] % k == 0) {
                pair = true;
                break;
            } else if(A[i] % k == 0) {
                flag = true;
            }
        }
    }

    int tmp = 0;
    for(int i=0; i<N; i++) {
        tmp = gcd(tmp, A[i]);
    }

    if(pair && tmp == 1) {
        cout << "setwise coprime" << endl;
    } else if(pair) {
        cout << "not coprime" << endl;
    } else {
        cout << "pairwise coprime" << endl;
    }
    return 0;
}
