#include <bits/stdc++.h>
long long int gcd(long long int a, long long int b) {
  if (a < b) {
    gcd(b, a);
  }
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int flag = 0;
  long long int n, i, j;
  cin >> n;
  long long int a[n];
  cin >> a[0];
  long long int gc = a[0], g;
  for (i = 1; i < n; ++i) {
    cin >> a[i];
    gc = gcd(gc, a[i]);
  }
  for (i = 0; i < n - 1; ++i) {
    for (j = i + 1; j < n; ++j) {
      g = gcd(a[i], a[j]);
      if (g != 1) {
        flag = 1;
        break;
      }
    }
  }
  if (flag == 0)
    cout << "pairwise coprime\n";
  else if (gc == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
