#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << '\n';
  err(++it, args...);
}
long long MOD = 1000000009;
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  long long int p = 1;
  for (long long int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  for (long long int i = 0; i < (n); i++) {
    p = (p * a[i]);
  }
  sort((a).begin(), (a).end());
  long long int preG[n], preL[n];
  for (long long int i = 0; i < (n); i++) {
    if (!i) {
      preG[i] = a[i];
      preL[i] = a[i];
    } else {
      preG[i] = gcd(preG[i - 1], a[i]);
      preL[i] = (a[i] / gcd(a[i], preL[i - 1])) * preL[i - 1];
    }
  }
  if (preL[n - 1] == p) {
    cout << "pairwise coprime" << '\n';
    return 0;
  }
  if (preG[n - 1] == 1 && preL[n - 1] != p) {
    cout << "setwise coprime" << '\n';
    return 0;
  }
  cout << "not coprime" << '\n';
}
