#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1000005;
long long A[MAX_N];
vector<long long> pri;
long long mygcd(long long a, long long b) {
  if (b == 0) return a;
  return mygcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  long long stwise = 0;
  bool stcheck = false;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    if (i == 0)
      stwise = A[i];
    else
      stwise = mygcd(stwise, A[i]);
  }
  if (stwise != 1) {
    cout << "not coprime" << endl;
    return 0;
  } else {
    stcheck = true;
  }
  for (int i = 2; i <= 1000005; ++i) {
    bool flag = true;
    for (int j = 2; j * j <= i; ++j) {
      if (i % j == 0) {
        flag = false;
        break;
      }
    }
    if (flag) pri.push_back(i);
  }
  for (int i = 0; i < pri.size(); i++) {
    int cnt = 0;
    for (int j = 0; j < N; j++) {
      if (A[j] % pri[i] == 0) {
        cnt++;
      }
    }
    if (cnt > 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
