import std.stdio;
import std.string;
import std.conv;
import std.algorithm;

void main() {
  readln;
  auto r = readln.chomp.split(" ").map!(to!uint).all!((a) => (a % 2 == 1) || (a % 3 == 0) || (a % 5 == 0));

  if (r) {
    writeln("APPROVED");
  } else {
    writeln("DENIED");
  }
}
