import std.stdio, std.conv, std.string, std.algorithm,
       std.math, std.array, std.container, std.typecons;

bool solve() {
  readln;
  int[] a = readln.chomp.split.to!(int[]);
  for(int i=0; i<a.length; i++) {
    if(a[i]%2==0) {
      if(a[i]%3==0 || a[i]%5==0) continue;
      else return false;
    }
  }
  return true;
}

void main() {
  if(solve) writeln("APPROVED");
  else writeln("DENIED");
}

