#include <bits/stdc++.h>
using namespace std;
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
long long prime_factor(long long x) {
  long long p = x;
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      p = i;
      break;
    }
  }
  return p;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int counter[(long long)1e6 + 3];
int main() {
  memset((counter), 0, sizeof(counter));
  map<long long, long long> mp;
  for (long long i = (1); i < (1e6 + 1); ++i) {
    long long p = prime_factor(i);
    if (p == i) {
      mp[i] = p;
    } else {
      mp[i] = i / p;
    }
  }
  long long N;
  cin >> N;
  vector<long long> A(N);
  long long maxA = 0;
  for (long long i = (0); i < (N); ++i) {
    cin >> A[i];
    maxA = max(A[i], maxA);
  }
  int g = gcd(A[0], A[1]);
  for (long long i = (1); i < (N); ++i) {
    g = gcd(A[i], g);
  }
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (long long i = (0); i < (N); ++i) {
    long long t = A[i];
    counter[t] += 1;
    if (counter[t] >= 2) {
      cout << "setwise coprime" << endl;
      return 0;
    }
    while (t != mp[t]) {
      t = mp[t];
      counter[t]++;
      if (counter[t] >= 2) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  bool resb = true;
  for (long long i = (2); i < (maxA + 1); ++i)
    if (counter[i] > 1) {
      resb = false;
      break;
    }
  if (resb) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
