#include <bits/stdc++.h>
using namespace std;
void cp() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  cp();
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i += 1) {
    cin >> a[i];
  };
  long long jk = *max_element(a, a + n);
  long long kt = 0;
  long long jh = 0;
  if (*min_element(a, a + n) == 1) {
    cout << "not coprime";
    exit(0);
  }
  if (jk >= 4) {
    for (long long i = 2; (i * i) <= jk; i++) {
      long long ct = 0;
      for (long long j = 0; j < n; j += 1) {
        if (a[j] % i == 0) {
          ct++;
        }
      }
      if (ct == n) {
        cout << "not coprime";
        jh = 1;
        break;
      } else if (ct >= 2) {
        kt = 1;
        break;
      }
      if (i >= 3) {
        i++;
      }
    }
    if (jh == 0) {
      if (kt == 0)
        cout << "pairwise coprime";
      else {
        cout << "setwise coprime";
      }
    }
  } else {
    for (long long i = 2; i <= jk; i++) {
      long long ct = 0;
      for (long long j = 0; j < n; j += 1) {
        if (a[j] % i == 0) {
          ct++;
        }
      }
      if (ct == n) {
        cout << "not coprime";
        jh = 1;
        break;
      } else if (ct >= 2) {
        kt = 1;
        break;
      }
      if (i >= 3) {
        i++;
      }
    }
    if (jh == 0) {
      if (kt == 0)
        cout << "pairwise coprime";
      else {
        cout << "setwise coprime";
      }
    }
  }
}
