#include <bits/stdc++.h>
using namespace std;
int gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long plis = a[0];
  for (long long i = 1; i < n; i++) {
    plis = gcd(plis, a[i]);
  }
  if (plis > 1) {
    cout << "not coprime\n";
    return 0;
  }
  vector<long long> ans(1000005, 0);
  for (long long i = 0; i < n; i++) {
    for (long long j = 2; j <= sqrt(a[i]); j++) {
      if (a[i] % j == 0) {
        ans[j]++;
        if (ans[j] > 1) {
          cout << "setwise coprime\n";
          return 0;
        }
      }
    }
  }
  cout << "pairwise coprime\n";
  return 0;
}
