#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const long long mod = 1e9 + 7;
const int inf = 2e9;
const long long lnf = 9e18;
map<long long, long long> pfmp;
vector<long long> pfv(0);
bool f1;
void pf(long long N) {
  long long n = N;
  if (n <= 0) return;
  if (n % 2 == 0) {
    if (pfmp[2] == 0)
      pfv.push_back(2);
    else
      f1 = 0;
    while (n % 2 == 0) {
      n /= 2;
      pfmp[2]++;
    }
  }
  if (n == 1) return;
  for (long long i = 3; i <= sqrt(N); i += 2) {
    if (n % i == 0) {
      if (pfmp[i] == 0)
        pfv.push_back(i);
      else
        f1 = 0;
      while (n % i == 0) {
        n /= i;
        pfmp[i]++;
      }
    }
  }
  if (n != 1) {
    if (pfmp[n] == 0)
      pfv.push_back(n);
    else
      f1 = 0;
    pfmp[n]++;
  }
}
long long gcd(long long a, long long b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  f1 = 1;
  vector<long long> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  for (int i = 0; i < (int)(n); i++) pf(a[i]);
  if (f1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long GCD = a[0];
  for (int i = 0; i < (int)(n - 1); i++) {
    GCD = gcd(GCD, a[i + 1]);
  }
  if (GCD == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
