#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
struct Factorizer {
  int n;
  vector<int> minFactor;
  vector<bool> cnt;
  Factorizer(int max) {
    int i, j;
    n = max;
    minFactor.resize(n);
    cnt.resize(n, 0);
    iota(minFactor.begin(), minFactor.end(), 0);
    for (i = 2; i * i < n; i++) {
      if (minFactor[i] < i) continue;
      for (j = i * i; j < n; j += i) {
        if (minFactor[j] == j) minFactor[j] = i;
      }
    }
  }
  bool check(int x) {
    while (x > 1) {
      if (cnt[minFactor[x]])
        return 1;
      else
        cnt[minFactor[x]] = 1;
      int t = minFactor[x];
      while (x % t == 0) {
        x /= t;
      }
    }
    return 0;
  }
};
int main(int argc, char *argv[]) {
  int n, i, s;
  cin >> n;
  Factorizer f(100001);
  vector<int> a(n);
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    if (f.check(a[i])) {
      break;
    }
  }
  if (i == n) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int c = gcd(a[0], a[1]);
  for (i = 2; i < n; i++) {
    c = gcd(c, a[i]);
    if (c == 1) break;
  }
  if (c == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
