#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  map<int, int> G;
  for (int i = 0; i < (int)(N); i++) {
    int x = A[i];
    for (int j = 2; j <= sqrt(A[i]); j++) {
      if (x == 1) break;
      if (x % j != 0) continue;
      while (x % j == 0) {
        x /= j;
      }
      G[j]++;
    }
    if (x != 1) G[x]++;
  }
  bool ok = true;
  for (auto x : G) {
    if (x.second != 1) {
      ok = false;
      break;
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ok = true;
  int y = A[0];
  for (int i = 0; i < (int)(N - 1); i++) {
    y = gcd(y, A[i + 1]);
    if (y == 1) break;
  }
  if (y != 1) ok = false;
  if (ok) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
