#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
long long gcd(long long x, long long y) {
  if (y == 0) return (x);
  return (gcd(y, x % y));
}
signed main(void) {
  long long n, mx;
  bool is_pair, is_setwise;
  cin >> n;
  vector<long long> a(n);
  mx = 0;
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  vector<bool> f(mx + 1, false);
  is_pair = true;
  for (int i = 0; i < (n); i++) {
    long long x = a[i];
    if (f[x] == true) is_pair = false;
    f[x] = true;
    for (long long j = 2; j * j <= x; j++) {
      long long cnt = 0;
      while (x % j == 0) {
        x /= j;
        cnt++;
      }
      if (cnt > 0) {
        if (f[j] == true) is_pair = false;
        f[j] = true;
      }
    }
  }
  if (is_pair) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  is_setwise = true;
  long long g = a[0];
  for (int i = 1; i < n; i++) g = gcd(a[i], g);
  if (g != 1) is_setwise = false;
  if (is_setwise) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
