#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int gcd(int x, int y) {
  if (y == 0) return x;
  return (gcd(y, x % y));
}
int main() {
  int n;
  scanf("%d", &n);
  int a[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int gcd1 = a[0];
  for (int i = 1; i < n; i++) gcd1 = gcd(gcd1, a[i]);
  if (gcd1 != 1)
    printf("not coprime\n");
  else {
    int flag = 0;
    map<int, bool> mp1;
    for (int i = 0; i < n - 1; i++) {
      int num = a[i];
      if (num % 2 == 0) {
        mp[2]++;
        mp1[2] = 1;
      }
      if (mp[2] > 1) {
        flag = 1;
        break;
      }
      while (num % 2 == 0) num /= 2;
      for (int j = 3; j * j <= num; j += 2) {
        if (num % j == 0) {
          mp[j]++;
          mp1[j] = 1;
        }
        if (mp[j] > 1) {
          flag = 1;
          break;
        }
        while (num % j == 0) num /= j;
      }
      if (num > 2 && mp1[num] == 0) mp[num]++;
      if (mp[num] > 1) {
        flag = 1;
        break;
      }
      mp1.clear();
    }
    if (flag == 0)
      printf("pairwise coprime\n");
    else
      printf("setwise coprime\n");
  }
  return 0;
}
