#include <bits/stdc++.h>
using namespace std;
mt19937 mrand(random_device{}());
const long long mod = 1000000007;
int rnd(int x) { return mrand() % x; }
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long modInverse(long long a) {
  long long p = mod - 2;
  return powmod(a, p);
}
int MAXN = 100;
vector<int> gpd(MAXN);
void sieve() {
  for (int i = 2; i < ((int)(gpd).size()); i++) {
    if (!gpd[i]) {
      for (int j = i; j < ((int)(gpd).size()); j += i) {
        gpd[j] = i;
      }
    }
  }
}
void fac(int x, vector<int>& freq) {
  while (x > 1) {
    freq[gpd[x]]++;
    x /= gpd[x];
  }
}
bool check(int x, vector<int>& freq) {
  while (x > 1) {
    int cnt = 0;
    int gp = gpd[x];
    while (x > 1 and x % gp == 0) {
      cnt++;
      x /= gp;
    }
    if (freq[gp] > cnt) {
      return true;
    }
  }
  return false;
}
void solve() {
  int n;
  cin >> n;
  sieve();
  vector<int> a(n);
  for (auto& x : a) cin >> x;
  int gc = a[0];
  for (int i = 1; i < n; i++) {
    gc = gcd(gc, a[i]);
  }
  vector<int> freq(MAXN);
  for (auto x : a) {
    fac(x, freq);
  }
  bool pair = true;
  for (auto x : a) {
    if (check(x, freq)) {
      pair = false;
      break;
    }
  }
  if (pair) {
    cout << "pairwise coprime"
         << "\n";
  } else if (gc == 1) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  solve();
}
