#include <bits/stdc++.h>
using namespace std;
int main() {
  array<bool, 1010> prime;
  prime[0] = false;
  prime[1] = false;
  for (int i = 2; i <= sqrt(1010); i++) {
    if (prime[i]) {
      int current = i;
      while (current < 1010 - i) {
        current += i;
        prime[current] = false;
      }
    }
  }
  int num;
  cin >> num;
  array<int, 1000010> v;
  int maximam = 0;
  for (int i = 0; i < num; i++) {
    cin >> v[i];
    maximam = max(maximam, v[i]);
  }
  bool pair = true;
  bool set = true;
  int index = 0;
  for (int i = 2; i <= sqrt(maximam); i++) {
    if (prime[i]) {
      int count = 0;
      for (int j = index; j < num; j++) {
        if (v[j] % i == 0) {
          count++;
        }
      }
      if (count > 1) {
        pair = false;
      }
      if (count == num) {
        set = false;
      }
    }
    while (v[index] < i) {
      index++;
    }
  }
  if (pair) {
    cout << "pairwise coprime";
  } else if (set) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  cout << endl;
  return 0;
}
