#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long gcd(long long a, long long b) {
  long long t;
  while (b) {
    t = b;
    b = a % b;
    a = t;
  }
  return a;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> a(n, 0);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long g = a[0];
  for (long long i = 1; i < n; i++) {
    if (g < a[i])
      g = gcd(a[i], g);
    else
      g = gcd(g, a[i]);
  }
  if (g > 1)
    cout << "not coprime\n";
  else {
    set<int> s;
    sort(a.begin(), a.end());
    for (int i = 0; i < n; i++) {
      for (int x : s) {
        if (a[i] % x == 0) {
          cout << "setwise coprime\n";
          return 0;
        }
      }
      for (int j = 2; j * 1ll * j <= a[i]; j++) {
        if (a[i] % j == 0) {
          s.insert(j);
          s.insert(a[i] / j);
        }
      }
      s.insert(a[i]);
    }
    cout << "pairwise coprime\n";
  }
  return 0;
}
