#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using db = double;
const int MOD = 1e9 + 9;
const int N = 1e6 + 5;
vector<int> freq(N, 0), primes;
vector<bool> is_prime(N, true);
void st_primes() {
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i * i < N; i++)
    if (is_prime[i]) {
      primes.emplace_back(i);
      for (int j = i * i; j < N; j += i) is_prime[i] = false;
    }
}
void st_pf(int x) {
  for (int i = 0; primes[i] * primes[i] <= x; i++) {
    bool flag = false;
    while (x % primes[i] == 0) {
      flag = true;
      x = x / primes[i];
    }
    if (flag) freq[primes[i]]++;
  }
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int &i : a) {
    cin >> i;
  }
  for (int &i : a) st_pf(i);
  int mx = *max_element(freq.begin(), freq.end());
  if (mx == 1)
    cout << "pairwise coprime\n";
  else if (mx == n)
    cout << "not coprime\n";
  else
    cout << "setwise coprime\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  st_primes();
  ll t = 1;
  while (t--) solve();
  return 0;
}
