#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 2;
vector<int> prime;
vector<bool> isPrime(MAX_N, 1);
void getPrime() {
  isPrime[0] = false, isPrime[1] = false;
  for (int i = 2; i <= sqrt(MAX_N); i++) {
    if (isPrime[i]) {
      prime.push_back(i);
      for (int j = i + i; j < MAX_N; j += i) isPrime[j] = false;
    }
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> v(N);
  for (auto& i : v) cin >> i;
  getPrime();
  bool pair = true, set = true;
  for (auto i : prime) {
    int cnt = 0;
    for (auto j : v)
      if (j % i == 0) cnt++;
    if (cnt > 1) pair = false;
    if (cnt == N) set = false;
  }
  if (pair)
    cout << "pairwise coprime";
  else if (set)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
