#include <bits/stdc++.h>
using namespace std;
long long int a[1000000];
bool t = true;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n, min = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] < min) min = a[i];
  }
  int k = 0, b = 0, x = 1;
  for (int i = 1; i < n; i++) {
    x = a[i] - a[i + 1];
    if (t)
      if (a[i] % x == 0 && a[i + 1] % x == 0) {
        t = false;
        cout << "setwise coprime";
      }
  }
  if (t)
    while (x == min) {
      x++;
      for (int i = 1; i <= n; i++)
        if (a[i] % x == 0) k++;
      if (k = n) {
        cout << "not coprime";
        x = min;
        t = false;
      }
    }
  if (t) cout << "pairwise coprime";
  return 0;
}
