#include <bits/stdc++.h>
using namespace std;
template <typename T>
string to_string(T o) {
  stringstream s;
  s << o;
  return s.str();
}
template <typename T>
string to_string(vector<T> v) {
  stringstream s;
  s << "[";
  for (auto i = 0; i < v.size(); i++) {
    s << to_string(v.at(i));
    if (i != v.size() - 1) {
      s << ", ";
    }
  }
  s << "]";
  return s.str();
}
template <typename T>
ostream &operator<<(ostream &o, const vector<T> &obj) {
  o << to_string(obj);
  return o;
}
template <typename T>
string to_string(vector<vector<T>> m) {
  stringstream s;
  s << "[" << endl;
  for (auto i = 0; i < m.size(); i++) {
    auto v = m[i];
    s << "  "
      << "#" << i << ":"
      << " " << to_string(v);
    s << ", " << endl;
  }
  s << "]";
  return s.str();
}
template <typename T>
ostream &operator<<(ostream &o, const vector<vector<T>> &obj) {
  o << to_string(obj);
  return o;
}
template <typename K, typename V>
string to_string(pair<K, V> p) {
  stringstream s;
  s << "pair(" << to_string(p.first) << ", " << to_string(p.second) << ")";
  return s.str();
}
template <typename K, typename V>
ostream &operator<<(ostream &o, const pair<K, V> &obj) {
  o << to_string(obj);
  return o;
}
template <typename K, typename V>
string to_string(map<K, V> m) {
  stringstream s;
  s << "{" << endl;
  for (const auto &p : m) {
    s << "  " << to_string(p.first) << ": " << to_string(p.second) << ","
      << endl;
  }
  s << "}";
  return s.str();
}
template <typename K, typename V>
ostream &operator<<(ostream &o, const map<K, V> &obj) {
  o << to_string(obj);
  return o;
}
template <typename T>
string to_string(set<T> ss) {
  stringstream s;
  s << "set"
    << "{";
  for (auto itr = ss.begin(); itr != ss.end(); itr++) {
    s << to_string(*itr);
    if (next(itr, 1) != ss.end()) {
      s << ", ";
    }
  }
  s << "}";
  return s.str();
}
template <typename T>
ostream &operator<<(ostream &o, const set<T> &obj) {
  o << to_string(obj);
  return o;
}
template <typename T>
string to_string(queue<T> q) {
  auto temp = queue<T>{};
  stringstream s;
  s << "queue{";
  while (!q.empty()) {
    auto top = q.front();
    s << to_string(top) << ", ";
    q.pop();
    temp.push(top);
  }
  s << "}";
  while (!temp.empty()) {
    auto top = temp.front();
    temp.pop();
    q.push(top);
  }
  return s.str();
}
template <typename T>
ostream &operator<<(ostream &o, const queue<T> &obj) {
  o << to_string(obj);
  return o;
}
const long long N = 1002;
vector<bool> isp(N, true);
void sieve() {
  isp[0] = false;
  isp[1] = false;
  for (auto i = 0; i <= N; i++) {
    if (isp[i]) {
      for (auto j = 2; i * j <= N; j++) isp[i * j] = false;
    }
  }
}
int main() {
  sieve();
  vector<long long> primes;
  for (auto j = 2; j < N; j++) {
    if (isp[j]) {
      primes.push_back(j);
    }
  }
  long long n;
  cin >> n;
  long long ones = 0;
  vector<long long> prime_counter(1000002, 0);
  bool is_pairwise_coprime = true;
  long long max_prime_counter = 0;
  for (auto i = 0; i < n; i++) {
    long long a;
    cin >> a;
    long long aa = a;
    if (a == 1) {
      ones++;
      continue;
    }
    for (auto j : primes) {
      if (j > a) {
        break;
      }
      long long is_divided = false;
      while (a % j == 0) {
        a /= j;
        is_divided = true;
      }
      if (is_divided) {
        if (prime_counter[j] > 0) {
          is_pairwise_coprime = false;
        }
        prime_counter[j]++;
        max_prime_counter = max(max_prime_counter, prime_counter[j]);
      }
    }
    if (aa > N && a == aa) {
      if (prime_counter[a] > 0) {
        is_pairwise_coprime = false;
      }
      prime_counter[a]++;
    }
    if (!is_pairwise_coprime && max_prime_counter != i + 1) {
      break;
    }
  }
  if (is_pairwise_coprime) {
    cout << "pairwise coprime" << endl;
    return 0;
  } else {
    if (ones > 0 || max_prime_counter != n) {
      cout << "setwise coprime" << endl;
      return 0;
    } else {
      cout << "not coprime" << endl;
      return 0;
    }
  }
}
