#include <bits/stdc++.h>
using namespace std;
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long MinimumGCD(long long arr[], long long n) {
  long long g = 0;
  for (long long i = 0; i < n; i++) {
    g = gcd(g, arr[i]);
  }
  return g;
}
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long u = MinimumGCD(a, n);
  if (u == 1) {
    cout << "pairwise coprime\n";
    return;
  } else {
    long long f = 0;
    for (long long i = 2; i < n; i++) {
      if (a[i] % u != 0) f = 1;
    }
    if (f == 0)
      cout << "not coprime\n";
    else
      cout << "setwise coprime\n";
  }
}
int main() {
  ios::sync_with_stdio(true);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
