#include <bits/stdc++.h>
using namespace std;
const char* inputCLineOrWord(int mode) {
  static char buf[2097152];
  static int bufLen = sizeof(buf);
  static int bufPos = sizeof(buf);
  static bool canReadFlag = true;
  static bool crFlag = false;
  static bool enterFlag = false;
  if (canReadFlag &&
      (enterFlag ? bufLen <= bufPos : (int)sizeof(buf) <= bufPos + bufPos)) {
    if (0 < bufLen - bufPos) {
      memmove(buf, buf + bufPos, bufLen - bufPos);
      bufLen -= bufPos;
    } else {
      bufLen = 0;
    }
    char* result = fgets(buf + bufLen, sizeof(buf) - bufLen, stdin);
    canReadFlag = (result != NULL);
    if (result != NULL) {
      int n = strlen(result);
      enterFlag = (n != (int)sizeof(buf) - 1 - bufLen ||
                   (1 <= bufLen + n && buf[bufLen + n - 1] == '\n'));
      bufLen += n;
    }
    bufPos = 0;
  }
  if (mode == 0) {
    int pos = bufPos;
    while (true) {
      char c = buf[pos];
      if (c == 32) {
        buf[pos++] = '\0';
        break;
      } else if (c == 10) {
        if (crFlag) {
          crFlag = false;
          if (bufPos == pos) {
            pos = ++bufPos;
            continue;
          }
        }
        buf[pos++] = '\0';
        break;
      } else if (c == 13) {
        crFlag = true;
        buf[pos++] = '\0';
        break;
      } else if (c == 0) {
        break;
      }
      ++pos;
    }
    const char* ret = buf + bufPos;
    bufPos = pos;
    while (true) {
      char c = buf[bufPos];
      if (c == 32 || c == 10 || c == 13) {
        ++bufPos;
      } else {
        break;
      }
    }
    return ret;
  } else if (mode == 1) {
    int pos = bufPos;
    while (true) {
      char c = buf[pos];
      if (c == 10) {
        if (crFlag) {
          crFlag = false;
          if (bufPos == pos) {
            pos = ++bufPos;
            continue;
          }
        }
        buf[pos++] = '\0';
        break;
      } else if (c == 13) {
        crFlag = true;
        buf[pos++] = '\0';
        break;
      } else if (c == 0) {
        break;
      }
      ++pos;
    }
    const char* ret = buf + bufPos;
    bufPos = pos;
    if (crFlag) {
      while (true) {
        char c = buf[bufPos];
        if (c == 13) {
          ++bufPos;
          crFlag = false;
          break;
        } else {
          break;
        }
      }
    }
    return ret;
  } else if (mode == 2) {
    return bufLen <= bufPos ? NULL : buf + bufPos;
  }
  assert(false);
  return NULL;
}
const char* inputCWord() { return inputCLineOrWord(0); }
int inputInt() { return atoi(inputCWord()); }
int gcd(int x, int y) {
  if (x < y) {
    int v = y % x;
    while (v != 0) {
      y = x;
      x = v;
      v = y % x;
    }
    return x;
  } else {
    int v = x % y;
    while (v != 0) {
      x = y;
      y = v;
      v = x % y;
    }
    return y;
  }
}
void print_unit(bool val) { printf("%s", val ? "true" : "false"); }
void print_unit(char val) { printf("%c", val); }
void print_unit(int val) { printf("%d", val); }
void print_unit(unsigned int val) { printf("%u", val); }
void print_unit(size_t val) { printf("%zd", val); }
void print_unit(const void* val) { printf("%p", val); }
void print_unit(long long val) { printf("%lld", val); }
void print_unit(__int128 val) {
  char buf[128];
  int idx = 128;
  buf[--idx] = '\0';
  bool sign = false;
  if (val < 0) {
    sign = true;
    val = -val;
  }
  if (val == 0) {
    buf[--idx] = '0';
  } else
    while (val) {
      buf[--idx] = '0' + (val % 10);
      val /= 10;
    }
  if (sign) {
    buf[--idx] = '-';
  }
  printf("%s", buf + idx);
}
void print_unit(double val) { printf("%g", val); }
void print_unit(const char* val) { printf("%s", val); }
void print_unit(const std::string& val) { printf("%s", val.c_str()); }
template <class T>
void print_unit(const std::vector<T>& val) {
  printf("vec(%d) {", (int)val.size());
  for (int i = 0; i < (int)val.size(); ++i) {
    fputc(' ', stdout);
    print_unit(val[i]);
  }
  printf(" }");
}
int N;
vector<int> A;
vector<int> B;
vector<int> P;
bool pc;
int ret;
int b;
int main() {
  N = inputInt();
  {
    A.resize(max((int)A.size(), (int)N));
    for (int $1 = 0, $e = (0 <= N ? N : (int)A.size() + N); $1 < $e; ++$1)
      A[$1] = inputInt();
  }
  {
    B.resize(max((int)B.size(), (int)1e3 + 10));
    for (int $e0 = 1e3 + 10, $1 = 0,
             $e = (0 <= $e0 ? $e0 : (int)B.size() + $e0);
         $1 < $e; ++$1)
      B[$1] = 0;
  }
  {
    P.resize(max((int)P.size(), (int)0));
    for (int $1 = 0, $e = (0 <= 0 ? 0 : (int)P.size() + 0); $1 < $e; ++$1)
      P[$1] = 0;
  }
  for (int p = (0 <= 2 ? 2 : (int)B.size() + 2),
           $e = (0 <= 1001 ? 1001 : (int)B.size() + 1001);
       p < $e; ++p)
    if (B[p] == 0) {
      P.push_back(p);
      {
        B.resize(max((int)B.size(), (int)1001));
        for (int $d = p, $1 = (0 <= p ? p : (int)B.size() + p),
                 $e = (0 <= 1001 ? 1001 : (int)B.size() + 1001);
             0 <= $d ? $1 < $e : $e < $1; $1 += $d)
          B[$1] = 1;
      }
    }
  {
    B.resize(max((int)B.size(), (int)1e6 + 10));
    for (int $e0 = 1e6 + 10, $1 = 0,
             $e = (0 <= $e0 ? $e0 : (int)B.size() + $e0);
         $1 < $e; ++$1)
      B[$1] = 0;
  }
  pc = true;
  ret = A[0];
  for (const int& a : A) {
    ret = gcd(ret, a);
    b = a;
    for (int p = 2, $e = 1001; p < $e; ++p)
      if (b % (p) == 0) {
        while (b % p == 0) {
          b /= p;
        }
        if (B[p]) {
          pc = false;
        }
        ++B[p];
      }
    if (b != 1) {
      if (B[b]) {
        pc = false;
      }
      ++B[b];
    }
  }
  print_unit(pc         ? "pairwise coprime"
             : ret == 1 ? "setwise coprime"
                        : "not coprime"),
      fputc('\n', stdout);
  return 0;
}
