#include <bits/stdc++.h>
using namespace std;
int b[1000010];
int d[1000010];
int main() {
  int n, a;
  int p, ans;
  cin >> n;
  ans = 1;
  for (int i = 0; i < (int)(1000010); i++) b[i] = 0;
  for (int i = 0; i < (int)(1000010); i++) d[i] = 0;
  for (int i = (2); i <= (int)(1010); i++) {
    for (int j = (i); j <= (int)(1000010 / i); j++) {
      if (d[j * i] == 0) d[j * i] = i;
    }
  }
  for (int k = 0; k < (int)(n); k++) {
    cin >> a;
    p = 0;
    while (d[a] > 0) {
      if (d[a] > p) {
        p = d[a];
        b[p]++;
        if (b[p] > ans) ans = b[p];
      }
      a /= p;
    }
    if (a <= p) continue;
    b[a]++;
    if (b[a] > ans) ans = b[a];
  }
  if (ans == n) {
    cout << "not coprime" << endl;
    return 0;
  } else if (ans > 1) {
    cout << "setwise coprime" << endl;
    return 0;
  } else {
    cout << "pairwise coprime" << endl;
    return 0;
  }
}
