#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  long long N;
  N = 1000000;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  long long G = A.at(0);
  for (long long i = 1; i < N; i++) {
    G = gcd(G, A.at(i));
  }
  unordered_map<long long, long long> mp;
  for (long long i = 0; i < N; i++) {
    long long R = A.at(i);
    for (long long j = 2; j * j <= R; j++) {
      if (R % j == 0) {
        mp[j]++;
      }
      if (R == 1) {
        break;
      }
      if (R == 1) {
        break;
      }
    }
    if (R != 1) {
      mp[R]++;
    }
  }
  long long check = 0;
  for (long long i = 2; i <= 1000000; i++) {
    if (mp[i] >= 2) {
      check++;
    }
  }
  if (check == 0) {
    cout << "pairwise coprime" << endl;
  } else if (G == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
