#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b > a) return gcd(b, a);
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long gcd2(long long a[], long long n) {
  long long res = a[0];
  for (long long i = 1; i < n; i++) {
    res = gcd(res, a[i]);
  }
  return res;
}
int32_t main() {
  long long n;
  cin >> n;
  long long a[n];
  long long i;
  for (i = 0; i < n; i++) cin >> a[i];
  bool boolarr = false;
  long long gcdarr = gcd2(a, n);
  long long cnt = 0;
  for (long long i = 0; i < n - 1; i++) {
    for (long long j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) == 1)
        cnt++;
      else if (gcd(a[i], a[j]) != 1) {
        if (gcdarr == 1) boolarr = true;
      }
    }
  }
  long long z = n * (n - 1) / 2;
  if (cnt == z)
    cout << "pairwise coprime" << endl;
  else if (boolarr == true)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
