#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000000 + 10;
int gcd[maxn], maxSum = 0;
int GCD(int a, int b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
void slide(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      gcd[i]++;
      while (x % i == 0) x /= i;
    }
  }
  if (x > 1) gcd[x]++;
}
int main() {
  int n, m;
  cin >> n >> m;
  int gc = m;
  for (int i = 2; i <= n; i++) {
    cin >> m;
    maxSum = max(maxSum, m);
    gc = GCD(gc, m);
    slide(m);
  }
  if (gc == 1) {
    for (int i = 2; i <= maxSum; i++) {
      if (gcd[i] > 1) {
        cout << "setwise coprime" << endl;
        return 0;
      } else {
        cout << "pairwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "not coprime" << endl;
  return 0;
}
