#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
bool compare(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first != b.first) {
    return a.first < b.first;
  } else {
    return a.second < b.second;
  }
}
bool In_map(long long y, long long x, long long h, long long w) {
  if (y < 0 || x < 0 || y >= h || x >= w) {
    return 0;
  } else {
    return 1;
  }
}
const vector<long long> dx{1, 0, -1, 0};
const vector<long long> dy{0, 1, 0, -1};
vector<bool> IsPrime;
long long flag = 0;
long long N;
vector<long long> A;
int main() {
  cin >> N;
  A.resize(N);
  for (int i = 0; i < (N); i++) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  long long agcd = A[0];
  long long alcm = A[0];
  long long ap = A[0];
  for (int i = 1; i <= (N - 1); i++) {
    agcd = gcd(agcd, A[i]);
    alcm = lcm(alcm, A[i]) % 1000000000000007;
    ap = (ap * A[i]) % 1000000000000007;
    if (alcm != ap) {
      flag = 1;
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
  } else if (agcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
