#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  string S = "APPROVED";
  for (int i = 0; i < N; i++) {
    int A;
    cin >> A;
    if (A % 2 == 0) if (A % 3 and A % 5) S = "DENIED";
  }
  cout << S << "\n";
}
