#include <bits/stdc++.h>
using namespace std;
bool isprime(int n) {
  if (n == 1) return false;
  if (n == 2 || n == 3) return true;
  int c = n % 6;
  if (c != 1 && c != 5) return false;
  for (int i = 5; i * i <= n; i += 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
int n, a[1000005];
vector<int> prime;
int maxa = -1, maxtimes = -1;
bool allones = true;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    allones &= (a[i] == 1);
    maxa = max(maxa, a[i]);
  }
  if (allones) {
    cout << "pairwise coprime";
    return 0;
  }
  for (int i = 2; i <= maxa; i++) {
    if (isprime(i)) prime.push_back(i);
  }
  for (unsigned int p = 0; p < prime.size(); p++) {
    int tp = prime[p], times = 0;
    for (int i = 1; i <= n; i++) {
      if (a[i] % tp == 0) times++;
    }
    maxtimes = max(maxtimes, times);
    if (maxtimes == n) break;
  }
  if (maxtimes == 1)
    cout << "pairwise coprime";
  else if (maxtimes == n)
    cout << "not coprime";
  else
    cout << "setwise coprime";
  return 0;
}
