#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<int> prime;
  for (int i = 2; i <= 1000000; ++i) {
    int fl = 1;
    for (int j = 2; j * j <= i; ++j) {
      if (i % j == 0) {
        fl = 0;
        break;
      }
    }
    if (fl) prime.push_back(i);
  }
  int n;
  cin >> n;
  int data[n];
  for (int i = 0; i < n; ++i) cin >> data[i];
  int fl = 1;
  int fl2 = 1;
  vector<int> used(100001, 0);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < prime.size() && data[i] != 1; ++j) {
      if (data[i] % prime[j] == 0) {
        if (used[prime[j]] != 0) {
          fl = 0;
        }
        used[prime[j]] += 1;
        if (used[prime[j]] >= n) {
          fl2 = 0;
        }
        data[i] /= prime[j];
      }
    }
  }
  if (fl)
    cout << "pairwise coprime";
  else if (fl2)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
