#include <bits/stdc++.h>
using namespace std;
map<long long int, long long int> sosu;
const long long int A = 1000005;
int main() {
  long long int n;
  cin >> n;
  vector<long long int> data(1000010);
  for (int i = int(0); i < int(n); ++i) {
    long long int a;
    cin >> a;
    data[a]++;
  }
  vector<long long int> sosu(1000010);
  for (int i = int(2); i < int(A); ++i) {
    long long int j = i;
    while (j < A) {
      sosu[i] += data[j];
      j += i;
    }
  }
  sort(sosu.begin(), sosu.end());
  reverse(sosu.begin(), sosu.end());
  if (sosu[0] == 1) {
    cout << "pairwise coprime" << endl;
  } else if (sosu[0] == n) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
