#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - 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() {
  int a;
  cin >> a;
  int arr[a];
  for (int i = 0; i < a; i++) {
    cin >> arr[i];
  }
  int p = 0;
  for (int i = 0; i < a - 1; i++) {
    for (int j = i + 1; j < a; j++) {
      int e = gcd(arr[i], arr[j]);
      if (e == 1) {
        p = 2;
        continue;
      }
    }
  }
  int u = findGCD(arr, a);
  if (p == 2) {
    cout << "pairwise coprime";
  } else if (p != 2 && u == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
