#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> A(n);
  for (long long i = 0; i < n; ++i) cin >> A[i];
  vector<long long> div(1000001, 0);
  for (long long i = 0; i < n; ++i) {
    if (A[i] % 2 == 0) div[2]++;
    for (long long d = 3; d * d <= A[i]; d += 2)
      if (A[i] % d == 0) div[d]++;
    if (A[i] > 2) div[A[i]]++;
  }
  long long m = *max_element(div.begin(), div.end());
  if (m < 2)
    cout << ("pairwise coprime") << endl;
  else if (m < 2)
    cout << ("setwise coprime") << endl;
  else
    cout << ("not coprime") << endl;
  return 0;
}
