#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
long long power(long long b, long long e, long long m) {
  if (b == 0) return 0;
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b % m, e / 2, m) % m;
  return power(b * b % m, e / 2, m);
}
long long power(long long b, long long e) {
  if (b == 0) return 0;
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b, e / 2);
  return power(b * b, e / 2);
}
bool isPowerOfTwo(long long x) { return (x && !(x & (x - 1))); }
long long vis[1000007];
int gcdd(int x, int y) { return (x == 0) ? y : gcdd(y % x, x); }
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  cin >> a[0];
  long long gcd = a[0];
  for (long long i = 1; i < n; i++) {
    cin >> a[i];
    gcd = gcdd(gcd, a[i]);
  }
  for (long long i = 0; i < n; i++) {
    long long x = a[i];
    for (long long j = 2; j * j <= x; j++) {
      if (x % j == 0) {
        while (x % j == 0) x /= j;
        vis[j]++;
      }
    }
    if (x > 1) vis[x]++;
  }
  bool flag = false;
  for (long long i = 2; i < 10000001; i++) {
    if (vis[i] > 1) {
      flag = true;
      break;
    }
  }
  if (gcd == 1) {
    if (flag != 0) {
      cout << "setwise coprime " << endl;
    } else
      cout << "pairwise coprime " << endl;
  } else
    cout << "not coprime" << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tt = 1;
  while (tt--) {
    solve();
    cout << "\n";
  }
  return 0;
}
