#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Graph = vector<vector<int>>;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
const ll MOD = 1000000007;
template <typename T>
inline string toString(const T &a) {
  ostringstream oss;
  oss << a;
  return oss.str();
};
int func(ll N, vector<ll> &A) {
  vector<int> isPrime(1001, 1);
  for (int i = 2; i < 1001; i++) {
    if (isPrime[i] == 0) continue;
    for (int j = 2 * i; j < 1001; j += i) {
      isPrime[j] = 0;
    }
  }
  int flag = 0;
  vector<int> check;
  for (int i = 2; i < 1001; i++) {
    if (isPrime[i] == 1) check.push_back(i);
  }
  int s = check.size();
  vector<int> cntl(s, 0);
  for (int i = 0; i < s; i++) {
    int now = check[i];
    int cnt = 0;
    for (int j = 0; j < N; j++) {
      if (now > A[j]) continue;
      if (A[j] % now == 0) {
        cnt++;
      }
    }
    cntl[i] = cnt;
  }
  flag = 2;
  for (int i = 0; i < s; i++) {
    if (cntl[i] == N) {
      flag = 0;
      break;
    } else if (cntl[i] >= 2)
      flag = 1;
  }
  return flag;
}
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int flag = func(N, A);
  if (flag == 0) {
    cout << "not coprime" << endl;
  } else if (flag == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
}
