#include <bits/stdc++.h>
using namespace std;
const int MAX = 700000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}
long long COM(int n, int k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
long long int maxtime(long long int x, long long int y) {
  return (x + y - 1) / y;
}
long long int lcm(long long int number1, long long int number2) {
  long long int m = number1;
  long long int n = number2;
  if (number2 > number1) {
    m = number2;
    n = number1;
  }
  long long int s = -1;
  while (s != 0) {
    s = m % n;
    m = n;
    n = s;
  }
  return m;
}
long long int gcd(long long int number1, long long int number2) {
  long long int m = number1;
  long long int n = number2;
  return m / lcm(m, n) * n;
}
long long int modinv(long long a, long long m) {
  long long int b = m, u = 1, v = 0;
  while (b) {
    long long int t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
vector<long long int> meguru;
bool isOK(int index, int key) {
  if (meguru[index] >= key)
    return true;
  else
    return false;
}
int binary_search(int key) {
  int left = -1;
  int right = (int)meguru.size();
  while (right - left > 1) {
    int mid = left + (right - left) / 2;
    if (isOK(mid, key))
      right = mid;
    else
      left = mid;
  }
  return right;
}
long long modpow(long long a, long long n, long long mod) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
int sosu[1000] = {};
int uenososu[1000020] = {};
int main() {
  long long int n;
  cin >> n;
  vector<int> v;
  int b = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    v.push_back(a);
    for (int j = 2; j <= 1000; j++) {
      if (a % j == 0) {
        if (sosu[j] != 0) {
          b = 1;
        } else {
          sosu[j]++;
        }
      }
      while (a % j == 0) {
        a = a / j;
      }
      if (j == 1000 && a != 1) {
        uenososu[a]++;
      }
    }
  }
  for (int i = 1; i <= 1000000; i++) {
    if (uenososu[i] >= 2) {
      break;
    }
    if (i == 1000000 && b == 0) {
      cout << "pairwise coprime";
      return 0;
    }
  }
  int g = v[0];
  for (int i = 1; i < v.size(); i++) {
    g = lcm(g, v[i]);
  }
  if (g == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
