#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, i, j;
  cin >> n;
  vector<long long> v;
  long long x;
  long long f = 0, g = 0;
  for (i = 1; i <= n; i++) {
    cin >> x;
    v.push_back(x);
  }
  for (i = 0; i <= n - 2; i++) {
    for (j = i + 1; j <= n - 1; j++) {
      if (gcd(v[j], v[i]) != 1) {
        f++;
        break;
      }
    }
    if (f == 1) break;
  }
  sort(v.begin(), v.end());
  if (f == 0)
    cout << "pairwise coprime"
         << "\n";
  else {
    for (i = v[0]; i >= 2; i--) {
      for (j = 0; j <= n - 1; j++) {
        if (v[j] % i == 0) {
          g++;
        }
      }
      if (g == 3)
        break;
      else
        g = 0;
    }
    if (g < 3)
      cout << "setwise coprime"
           << "\n";
    else
      cout << "not coprime"
           << "\n";
  }
}
