#include <bits/stdc++.h>
using namespace std;
int a[1000010];
int ma[1000010];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  int mx = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  int te = a[1];
  for (int i = 2; i <= n; i++) {
    te = gcd(te, a[i]);
  }
  if (te == 1) {
    int flag = 0;
    for (int i = 1; i <= n; i++) {
      for (int j = 2; j * j <= a[i]; j++) {
        if (a[i] % j == 0) {
          if (a[i] / j != j) {
            ma[a[i] / j]++;
          }
          ma[j]++;
        }
      }
    }
    for (int i = 2; i <= mx; i++) {
      if (ma[i] > 1) {
        flag = 1;
        break;
      }
    }
    if (flag) {
      cout << "setwise coprime";
    } else {
      cout << "pairwise coprime";
    }
  } else {
    cout << "not coprime";
  }
  return 0;
}
