#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char& c) {
  string res;
  return "'" + res + c + "'";
}
string to_string(bool b) { return (b ? "True" : "False"); }
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
long long gcd(long long a, long long b) {
  if (b == (long long)0)
    return a;
  else
    return gcd(b, a % b);
}
const int ub = 1e6;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<bool> prime(ub + 1, true);
  prime[0] = prime[1] = 0;
  for (int i = 2; i <= ub; ++i) {
    if (!prime[i]) continue;
    for (int j = 2 * i; j <= ub; j += i) prime[j] = 0;
  }
  vector<int> primes;
  primes.reserve(n);
  for (int i = 0; i <= ub; ++i) {
    if (prime[i]) primes.push_back(i);
  }
  int num_primes = primes.size();
  vector<vector<bool>> vis(n, vector<bool>(num_primes));
  for (int i = n - 2; i >= 0; --i) {
    vis[i] = vis[i + 1];
    for (int j = 0; j < num_primes; ++j) {
      if (a[i + 1] % primes[j] == 0) vis[i][j] = 1;
    }
  }
  bool bad = 0;
  for (int i = 0; i < n - 1 && !bad; ++i) {
    for (int j = 0; j < num_primes; ++j) {
      if (a[i] % primes[j] == 0 && vis[i][j]) {
        bad = 1;
        break;
      }
    }
  }
  if (!bad) {
    cout << "pairwise coprime" << '\n';
    return 0;
  }
  int tot_g = a[0];
  for (int i = 1; i < n; ++i) tot_g = (int)gcd(tot_g, a[i]);
  if (tot_g == 1) {
    cout << "setwise coprime" << '\n';
    return 0;
  }
  cout << "not coprime" << '\n';
  return 0;
}
