#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int inf = 2e9 + 5;
double PI = 3.14159265358979323846;
const int N = 2e5 + 5;
vector<int> primes;
vector<int> p(N, 1);
void sieve() {
  p[1] = p[0] = 0;
  for (long long int i = 2; i < N; i++) {
    if (p[i]) {
      for (long long int j = i * i; j < N; j += i) {
        p[i] = 0;
      }
      primes.push_back(i);
    }
  }
}
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T lcm(T a, T b) {
  return (a * b) / gcd(a, b);
}
void solve() {
  sieve();
  int n;
  cin >> n;
  int a[n];
  int G;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i) {
      G = gcd(G, a[i]);
    } else {
      G = a[i];
    }
  }
  if (G != 1) {
    cout << "not coprime"
         << "\n";
    return;
  }
  vector<int> cnt(N, 0);
  for (int i = 0; i < n; i++) {
    int x = a[i];
    for (int k = 0; k < (int)primes.size() && primes[k] * primes[k] <= x; k++) {
      if (x % primes[k] == 0) {
        if (cnt[primes[k]]) {
          cout << "setwise coprime"
               << "\n";
          return;
        }
        while (x % primes[k] == 0) {
          x = x / primes[k];
        }
        cnt[primes[k]]++;
      }
    }
    if (x > 1) {
      if (cnt[x]) {
        cout << "setwise coprime"
             << "\n";
        return;
      }
      cnt[x]++;
    }
  }
  cout << "pairwise coprime"
       << "\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
