#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long long mod = 1e9 + 7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
long long modpow(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) {
      res = res * a % mod;
    }
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
bool isPrime[1000010];
void eratosthenes() {
  for (int i = 0; i < (int)1000010; i++) isPrime[i] = 1;
  isPrime[0] = isPrime[1] = 0;
  for (int i = 0; i < (int)1000010; i++) {
    if (isPrime[i]) {
      for (int j = i * 2; j < 1000010; j += i) {
        isPrime[j] = 0;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)n; i++) cin >> a[i];
  vector<int> primeList;
  vector<int> a0prime;
  eratosthenes();
  for (int i = 0; i < (int)1000010; i++) {
    if (isPrime[i]) primeList.push_back(i);
    if (isPrime[i] && a[0] % i == 0) a0prime.push_back(i);
  }
  bool pairwiseFlag = 1, setwiseFlag = 1;
  for (int j = 0; j < (int)primeList.size(); j++) {
    int prime = primeList[j];
    int count = 0;
    for (int i = 0; i < (int)n; i++) {
      if (a[i] % prime == 0) count++;
    }
    if (count > 1) {
      pairwiseFlag = 0;
      break;
    }
  }
  int allgcd = a[0];
  for (int i = 0; i < (int)n; i++) allgcd = gcd(allgcd, a[i]);
  if (pairwiseFlag) {
    cout << "pairwise coprime" << endl;
  } else if (allgcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
