#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const unsigned long long mod = 1e9 + 7;
const long long INF = 1LL << 60;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
void chmin(long long &a, long long b) {
  if (a > b) a = b;
}
void chmax(long long &a, long long b) {
  if (a < b) a = b;
}
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;
    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 vector_finder(vector<long long> vec, long long number) {
  auto itr = find(vec.begin(), vec.end(), number);
  int index = distance(vec.begin(), itr);
  if (index != vec.size()) {
    return index + 1;
  } else {
    return 0;
  }
}
int main() {
  int N, max = 1;
  cin >> N;
  vector<long long> number = {1};
  vector<pair<long long, long long>> count = {make_pair(1, 1)};
  for (long long k = 0; k < (N); k++) {
    long long A;
    cin >> A;
    const auto &res = prime_factorize(A);
    vector<long long> s;
    for (auto p : res) {
      for (int i = 0; i < p.second; ++i) {
        s.push_back(p.first);
      }
    }
    s.erase(unique(s.begin(), s.end()), s.end());
    for (long long i = 0; i < (s.size()); i++) {
      if (vector_finder(number, s.at(i)) != 0) {
        count.at(vector_finder(number, s.at(i)) - 1).second++;
        if (count.at(vector_finder(number, s.at(i)) - 1).second > max)
          max = count.at(vector_finder(number, s.at(i)) - 1).second;
      } else {
        count.push_back(make_pair(s.at(i), 1));
        number.push_back(s.at(i));
      }
    }
  }
  if (max == 1)
    cout << "pairwise coprime"
         << "\n";
  else if (max == N)
    cout << "not coprime"
         << "\n";
  else
    cout << "setwise coprime"
         << "\n";
  return 0;
}
