#include <bits/stdc++.h>
using namespace std;
int Gcd(int a, int b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return Gcd(b % a, a);
}
int main() {
  int n;
  cin >> n;
  int a[n];
  int odd = 0, even = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0)
      even++;
    else
      odd++;
  }
  int setco = 0;
  int c = 0;
  for (int i = 0; i < n; i++) {
    c = Gcd(c, a[i]);
  }
  if (c == 1) setco = 1;
  if (setco) {
    if (even >= 2) {
      cout << "setwise coprime";
      return 0;
    }
    vector<int> v(1000004, 0);
    int cc = 1;
    for (int i = 0; i < n; i++) {
      if (a[i] % 2 == 0) continue;
      int x = a[i];
      for (int i = 1; i <= sqrt(x); i++) {
        if (x % i == 0) {
          int y = x / i;
          v[i]++;
          v[y]++;
          if ((i != 1 && v[i] > 1) || (y != 1 && v[y] > 1)) {
            cc = 0;
            break;
          }
        }
        if (cc == 0) break;
      }
      if (cc == 1) {
        cout << "pairwise coprime";
        return 0;
      }
      cout << "setwise coprime";
    }
  } else {
    cout << "not coprime";
  }
}
