#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  vector<int> vb(1e6 + 9);
  bool flag1 = true;
  bool flag2 = true;
  for (int j = 0; j < (n); j++) {
    for (int i = 2; i <= sqrt(a[i]); i++) {
      if (a[j] % i == 0) {
        if (vb[i] > 0 || vb[a[j] / i] > 0) {
          flag1 = false;
          break;
        }
        vb[a[j] / i]++;
        vb[i]++;
      }
    }
  }
  int g = gcd(a[0], a[1]);
  for (int i = 0; i < (n); i++) {
    g = gcd(a[i], g);
    if (g == 1) {
      flag2 = false;
      break;
    }
  }
  if (flag1) {
    cout << "pairwise coprime" << endl;
    return 0;
  } else if (flag2 == false) {
    cout << "setwise coprime" << endl;
    return 0;
  } else {
    cout << "not coprime" << endl;
    return 0;
  }
}
