#include <bits/stdc++.h>
using namespace std;
constexpr auto mod = 1000000007;
const long long INF = (1LL << 63);
int gcd(int a, int b) {
  if (b > a) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<bool> s(1000000, false);
  bool pc = true;
  for (int i = (0); i < (n); i++) {
    cin >> a[i];
    int x = a[i];
    for (int j = 2; j * j <= x; j++) {
      if (x % j == 0) {
        if (s[j])
          pc = false;
        else
          s[j] = true;
        while (x % j == 0) x /= j;
      }
    }
  }
  if (pc)
    cout << "pairwise coprime" << endl;
  else {
    int GCD = a[0];
    for (int i = (1); i < (n); i++) {
      GCD = gcd(GCD, a[i]);
    }
    if (GCD == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
