#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
  for (auto &i : vec) {
    cin >> i;
  }
  return is;
}
template <typename E>
ostream &operator<<(ostream &os, pair<E, E> &t) {
  os << t.first << ' ' << t.second;
  return os;
}
template <typename E>
ostream &operator<<(ostream &os, pair<const E, E> &t) {
  os << t.first << ' ' << t.second;
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &vec) {
  for (T i : vec) {
    os << i << ' ';
  }
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, vector<vector<T> > &vec) {
  for (vector<T> i : vec) {
    os << i << '\n';
  }
  return os;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int32_t main() {
  cin.tie(NULL);
  cout.tie(NULL);
  cout.setf(ios::fixed);
  cout.precision(10);
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) {
    scanf("%lld", &a[i]);
  }
  sort(a.begin(), a.end());
  long long g = gcd(a[0], a[1]);
  for (long long i = 2; i < n; ++i) {
    g = gcd(a[i], g);
  }
  if (g != 1) {
    cout << "not coprime" << '\n';
    return 0;
  }
  long long nn = 1000000;
  vector<bool> prime(nn + 1, true);
  prime[0] = prime[1] = false;
  for (long long i = 2; i <= nn; ++i)
    if (prime[i])
      if (i * 1ll * i <= nn)
        for (long long j = i * i; j <= nn; j += i) prime[j] = false;
  bool fflag = true;
  for (long long i = 2; i < 999983 + 1; ++i) {
    bool flag = prime[i];
    if (flag) {
      long long k = 0;
      for (long long j = 0; j < n; ++j) {
        k += (a[j] % i == 0);
      }
      if (k > 1) {
        fflag = false;
        break;
      }
    }
  }
  if (fflag) {
    cout << "pairwise coprime" << '\n';
  } else {
    cout << "setwise coprime" << '\n';
  }
  return 0;
}
