#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void util() {
  int n;
  cin >> n;
  map<int, int> mp;
  int x;
  int res = 1;
  bool flag = true;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (i == 0)
      res = x;
    else
      res = gcd(res, x);
    if (flag) {
      for (int j = 2; j <= sqrt(x); j++) {
        if (x % j == 0) {
          mp[j]++;
          if (mp[j] > 1) flag = false;
          if (j != x / j) {
            mp[x / j]++;
            if (mp[x / j] > 1) flag = false;
          }
        }
      }
    }
  }
  if (!flag and res == 1) {
    cout << "setwise coprime";
    return;
  }
  if (flag and res == 1) {
    cout << "pairwise coprime";
  } else
    cout << "not coprime";
}
int main() {
  util();
  return 0;
}
