#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9;
const int mod = 1e9 + 7;
const int N = 1000010;
unsigned long long p_hash(unsigned long long x, unsigned long long y) {
  return (x + y) * (x + y + 1) / 2 + y;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
bool notPirme[N + 1];
int primes[N + 1];
int cnt;
int a[N];
int mk[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  for (int i = 2; i <= N; i++) {
    if (!notPirme[i]) primes[cnt++] = i;
    for (int j = 0; primes[j] <= N / i; j++) {
      notPirme[primes[j] * i] = true;
      if (i % primes[j] == 0) break;
    }
  }
  int n;
  cin >> n;
  for (int i = (0); i < (n); i++) cin >> a[i];
  for (int i = (0); i < (n); i++) {
    for (int j = (0); j < (N); j++) {
      if (a[i] % primes[j] == 0) mk[primes[j]]++;
      while (a[i] % primes[j] == 0) {
        a[i] /= primes[j];
      }
      if (a[i] == 1) break;
    }
  }
  int flag = 0;
  for (int i = (0); i < (N); i++) {
    if (mk[primes[i]] >= 2) flag = 1;
    if (mk[primes[i]] == n) {
      flag = 2;
      break;
    }
  }
  if (!flag)
    cout << "pairwise coprime" << endl;
  else if (flag == 2)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
