#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(int arr[], int n) {
  int result = arr[0];
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  int n, i, j;
  cin >> n;
  int a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  bool pairco = true;
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) != 1) {
        pairco = false;
        break;
      }
    }
  }
  if (pairco) {
    cout << "pairwise coprime";
  } else {
    if (findGCD(a, n) == 1) {
      cout << "setwise coprime";
    } else {
      cout << "not coprime";
    }
  }
  return 0;
}
