#include <bits/stdc++.h>
using namespace std;
template <class L, class R>
ostream& operator<<(ostream& cout, pair<L, R> P) {
  return cout << '(' << P.first << ',' << P.second << ')';
}
template <class T>
ostream& operator<<(ostream& cout, vector<T> V) {
  cout << "[ ";
  for (auto v : V) cout << v << ' ';
  return cout << ']';
}
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  set<long long> inp;
  long long g = 0;
  for (long long i = 0; i < n; ++i) {
    long long tmp;
    cin >> tmp;
    g = gcd(g, tmp);
    if (tmp != 1) {
      inp.insert(tmp);
    }
  }
  if (g != 1) {
    cout << "not coprime";
    return 0;
  }
  vector<long long> vec;
  for (auto it : inp) {
    vec.push_back(it);
  }
  n = vec.size();
  if (n > 78498) {
    cout << "setwise coprime\n";
    return 0;
  }
  vector<bool> pres(1000000, false);
  bool setwise = false;
  for (long long i = 0; i < n and !setwise; ++i) {
    long long num = vec[i];
    for (long long i = 2; i * i <= num and !setwise; ++i) {
      if (num % i == 0) {
        if (pres[i]) {
          setwise = true;
          break;
        }
        pres[i] = true;
        while (num % i == 0) {
          num /= i;
        }
      }
    }
    if (num > 1) {
      if (pres[num]) {
        setwise = true;
        pres[num] = true;
        break;
      }
    }
  }
  if (setwise) {
    cout << "setwise coprime\n";
    return 0;
  } else {
    cout << "pairwise coprime";
    return 0;
  }
}
