#include <bits/stdc++.h>
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 << " ] ";
  err(++it, args...);
}
template <typename Tk, typename Tv>
ostream& operator<<(ostream& os, const pair<Tk, Tv>& p) {
  os << "{" << p.first << ',' << p.second << "}";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& p) {
  os << "[ ";
  for (T x : p) os << x << " ";
  os << "]" << '\n';
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& p) {
  os << "{ ";
  for (T x : p) os << x << " ";
  os << "}" << '\n';
  return os;
}
template <typename Tk, typename Tv>
ostream& operator<<(ostream& os, const map<Tk, Tv>& p) {
  os << "{ ";
  for (pair<Tk, Tv> x : p) os << x << " ";
  os << "}" << '\n';
  return os;
}
long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
const long long int MAXN = 1e4 + 5;
long long int spf[MAXN];
void sieve() {
  spf[1] = 1;
  for (long long int i = 2; i < MAXN; i++) spf[i] = i;
  for (long long int i = 4; i < MAXN; i += 2) spf[i] = 2;
  for (long long int i = 3; i * i < MAXN; i++) {
    if (spf[i] == i) {
      for (long long int j = i * i; j < MAXN; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
set<long long int> getFactorization(long long int x) {
  set<long long int> ret;
  while (x != 1) {
    ret.insert(spf[x]);
    x = x / spf[x];
  }
  return ret;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    sieve();
    vector<long long int> a(n);
    cin >> a[0];
    long long int allgcd = a[0];
    for (long long int i = 1; i < n; i++) {
      cin >> a[i];
      allgcd = gcd(allgcd, a[i]);
    }
    bool parco = true;
    set<long long int> s;
    for (long long int i = 0; i < n; i++) {
      long long int val = a[i];
      set<long long int> gett = getFactorization(val);
      for (long long int tmp : gett) {
        if (s.find(tmp) != s.end()) {
          parco = false;
          goto out;
        }
        s.insert(tmp);
      }
    }
  out:
    if (parco) {
      cout << "pairwise coprime\n";
    } else {
      if (allgcd != 1) {
        cout << "not coprime\n";
      } else {
        cout << "setwise coprime\n";
      }
    }
  }
  return 0;
}
