#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T gcd(T a, T b) {
  while (b != 0) swap(b, a %= b);
  return a;
}
template <typename T>
inline void seethis(vector<T> vect) {
  for (T x : vect) cout << x << " ";
  cout << "\n";
}
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
int lcm(int a, int b) { return a * (b / gcd(a, b)); }
bool cmp(const pair<int, int> &a) { return a.first < a.second; }
long long int modpower(long long int a, long long int b, long long int c) {
  long long int res = 1;
  while (b) {
    if (b & 1LL) res = (res * a) % c;
    a = (a * a) % c;
    b >>= 1;
  }
  return res;
}
const long long MAX_SIZE = 1e5;
vector<long long> isprime(MAX_SIZE, true);
vector<long long> prime;
vector<long long> SPF(MAX_SIZE);
void manipulated_seive(int N) {
  isprime[0] = isprime[1] = false;
  SPF[1] = 1;
  for (long long int i = 2; i < N; i++) {
    if (isprime[i]) {
      prime.push_back(i);
      SPF[i] = i;
    }
    for (long long int j = 0;
         j < (int)prime.size() && i * prime[j] < N && prime[j] <= SPF[i]; j++) {
      isprime[i * prime[j]] = false;
      SPF[i * prime[j]] = prime[j];
    }
  }
}
long long int maxn = 1e6;
long long int n;
vector<long long int> vect(maxn);
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  ;
  manipulated_seive(100000);
  cin >> n;
  for (long long int i = 0; i < n; i++) cin >> vect[i];
  set<long long int> se;
  bool pw_co = true;
  long long int x = vect[0];
  for (long long int i = 0; i < n; i++) {
    long long int temp = vect[i];
    x = gcd(x, temp);
    while (temp > 1) {
      long long int factor = SPF[temp];
      if (se.find(factor) == se.end()) {
        se.insert(factor);
        temp /= factor;
      } else {
        pw_co = false;
        break;
      }
    }
  }
  if (pw_co) {
    cout << "pairwise coprime\n";
  } else if (x == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
