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