#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
void print(T t) {
  cout << t << endl;
}
ll MOD = 1000000007;
vector<pair<ll, int>> prime_factorize(ll n) {
  vector<pair<ll, int>> res;
  int num = 0;
  while (n % 2 == 0) {
    num++;
    n /= 2;
  }
  if (num != 0) res.emplace_back(make_pair(2, num));
  for (ll p = 3; p * p <= n; p += 2) {
    num = 0;
    while (n % p == 0) {
      num++;
      n /= p;
    }
    if (num != 0) res.emplace_back(make_pair(p, num));
  }
  if (n != 1) res.emplace_back(make_pair(n, 1));
  return res;
}
int main() {
  int N, maxA = 0;
  cin >> N;
  vector<int> A(N);
  for (auto& a : A) {
    cin >> a;
    maxA = max(maxA, a);
  }
  int maxW = 1;
  for (int p = 2; p <= sqrt(maxA) + 3; p++) {
    int w = 0;
    for (const auto& a : A) {
      if (a % p == 0) w++;
    }
    maxW = max(maxW, w);
  }
  if (maxW == 1 || maxA == 1) {
    cout << "pairwise coprime" << endl;
  } else if (maxW == N) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
