#include <bits/stdc++.h>
using namespace std;
int gcdExtended(int a, int b, int *x, int *y) {
  if (a == 0) {
    *x = 0;
    *y = 1;
    return b;
  }
  int x1, y1;
  int gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
int findGCD(long long arr[], int n) {
  int result = arr[0], x, y;
  for (int i = 1; i < n; i++) {
    result = gcdExtended(arr[i], result, &x, &y);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n, x, y;
  cin >> n;
  long long arr[n];
  bool pair = true;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcdExtended(arr[i], arr[j], &x, &y) != 1) {
        pair = false;
        break;
      }
    }
  }
  if (pair == true)
    cout << "pairwise coprime";
  else if (findGCD(arr, n) == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
