#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long gcd(long long n, long long m) {
  if (m == 0) return n;
  return gcd(m, n % m);
}
long long lcm(long long n, long long m) { return n / gcd(n, m) * m; }
map<long long, long long> allmp;
map<long long, long long> PrimeFac(long long n) {
  map<long long, long long> mp;
  long long cnt = 0;
  while (n % 2 == 0) {
    n /= 2;
    cnt++;
  }
  if (cnt != 0) {
    mp[2] = cnt;
    allmp[2] += cnt;
  }
  for (long long i = 3; i * i <= n; i += 2) {
    cnt = 0;
    while (n % i == 0) {
      n /= i;
      cnt++;
    }
    if (cnt != 0) {
      mp[i] = cnt;
      allmp[i] += cnt;
    }
  }
  if (n != 1) {
    mp[n] = 1;
    allmp[n] += 1;
  }
  return mp;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (int)(N); i++) {
    cin >> A[i];
  }
  long long g = gcd(A[0], A[1]);
  bool flagcop = false;
  if (g == 1) {
    flagcop = true;
  } else {
    for (int i = 0; i < (int)(N); i++) {
      if (A[i] % g != 0) {
        flagcop = true;
        break;
      }
    }
  }
  vector<map<long long, long long> > Amp;
  for (int i = 0; i < (int)(N); i++) {
    Amp.push_back(PrimeFac(A[i]));
  }
  bool flagpai = true;
  for (int i = 0; i < (int)(N); i++) {
    for (auto i : Amp[i]) {
      if (allmp[i.first] != i.second) {
        flagpai = false;
        break;
      }
    }
    if (flagpai == false) break;
  }
  if (flagcop && flagpai) {
    cout << "pairwise coprime" << endl;
  } else if (flagcop) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
