import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    for (int i=0;i<a;i++){
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    }
    System.out.println("APPROVED");
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    for (int i=0;i<a;i++){
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    }
    System.out.println("APPROVED");
  }
} Main public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    for (int i=0;i<a;i++){
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    }
    System.out.println("APPROVED");
  } main {
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    for (int i=0;i<a;i++){
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    }
    System.out.println("APPROVED");
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan for (int i=0;i<a;i++){
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    } int i=0; int i=0; i 0 i<a i a i++ i++ i {
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    } {
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    } int t = scan.nextInt(); t scan.nextInt() scan.nextInt scan if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      } t%2 != 0 t%2 t 2 0 {
        continue;
      } continue; {
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      } if ((t%3 == 0) || (t%5 == 0)){
          continue;
        } (t%3 == 0) || (t%5 == 0) (t%3 == 0) t%3 t 3 0 (t%5 == 0) t%5 t 5 0 {
          continue;
        } continue; System.out.println("DENIED") System.out.println System.out System System.out "DENIED" return; System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" String[] args args public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    for (int i=0;i<a;i++){
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    }
    System.out.println("APPROVED");
  }
} public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    for (int i=0;i<a;i++){
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    }
    System.out.println("APPROVED");
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    for (int i=0;i<a;i++){
      int t = scan.nextInt();
      if (t%2 != 0){
        continue;
      }
      else{
        if ((t%3 == 0) || (t%5 == 0)){
          continue;
        }
        System.out.println("DENIED");
        return;
      }
    }
    System.out.println("APPROVED");
  }
}
