#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;
vector<long long> P;
void sieve(size_t max) {
  if (max + 1 > IsPrime.size()) {
    IsPrime.resize(max + 1, true);
  }
  IsPrime[0] = false;
  IsPrime[1] = false;
  for (size_t i = 2; i * i <= max; ++i)
    if (IsPrime[i])
      for (size_t j = 2; i * j <= max; ++j) IsPrime[i * j] = false;
}
map<long long, long long> m;
vector<pair<long long, long long> > prime_factorize(long long N) {
  vector<pair<long long, long long> > res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    if (m[a] == 1) {
      flag = 1;
    }
    m[a] = 1;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1) res.push_back({N, 1});
  return res;
}
int main() {
  cin >> N;
  A.resize(N);
  for (int i = 0; i < (N); i++) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  sieve(1000050);
  long long agcd = A[0];
  for (int i = 0; i < (N); i++) {
    prime_factorize(A[i]);
    if (flag == 1) {
      break;
    }
  }
  for (int i = 1; i <= (N - 1); i++) {
    agcd = gcd(agcd, A[i]);
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
  } else if (agcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
