#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);
  int end = sqrt(a[0]);
  for (long long j = 2; j <= end; j++) {
    if (a[0] % j == 0) {
      ans[j]++;
      long long now = j;
      while (a[0] % j == 0) {
        a[0] /= j;
        ans[a[0]]++;
      }
    }
  }
  for (long long i = 1; i < n; i++) {
    bool cool = false;
    int ende = sqrt(a[i]);
    for (long long j = 2; j <= 10000; j++) {
      if (a[i] % j == 0) {
        ans[j]++;
        if (ans[j] > 1) {
          cool = true;
          ans[j]++;
          long long now = j;
          while (a[i] % j == 0) {
            a[i] /= j;
            ans[a[i]]++;
          }
        }
      }
    }
    if (cool)
      continue;
    else {
      cout << "pairwise coprime\n";
      return 0;
    }
  }
  cout << "setwise coprime\n";
  return 0;
}
