import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int iNum = sc.nextInt();
    sc.nextLine();
    String sValue = sc.nextLine();
    String[] sSplitStr = sValue.split(" ");
    String sResult;
    int iCnt1 = 0;
    int iCnt2 = 0;
    for (int i = 0; i < iNum; i++) {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    }
    if (iCnt1 == iCnt2) {
      sResult = "APPROVED";
    } else {
      sResult = "DENIED";
    }
    System.out.print(sResult);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int iNum = sc.nextInt();
    sc.nextLine();
    String sValue = sc.nextLine();
    String[] sSplitStr = sValue.split(" ");
    String sResult;
    int iCnt1 = 0;
    int iCnt2 = 0;
    for (int i = 0; i < iNum; i++) {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    }
    if (iCnt1 == iCnt2) {
      sResult = "APPROVED";
    } else {
      sResult = "DENIED";
    }
    System.out.print(sResult);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int iNum = sc.nextInt();
    sc.nextLine();
    String sValue = sc.nextLine();
    String[] sSplitStr = sValue.split(" ");
    String sResult;
    int iCnt1 = 0;
    int iCnt2 = 0;
    for (int i = 0; i < iNum; i++) {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    }
    if (iCnt1 == iCnt2) {
      sResult = "APPROVED";
    } else {
      sResult = "DENIED";
    }
    System.out.print(sResult);
  } main {
    Scanner sc = new Scanner(System.in);
    int iNum = sc.nextInt();
    sc.nextLine();
    String sValue = sc.nextLine();
    String[] sSplitStr = sValue.split(" ");
    String sResult;
    int iCnt1 = 0;
    int iCnt2 = 0;
    for (int i = 0; i < iNum; i++) {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    }
    if (iCnt1 == iCnt2) {
      sResult = "APPROVED";
    } else {
      sResult = "DENIED";
    }
    System.out.print(sResult);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int iNum = sc.nextInt(); iNum sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String sValue = sc.nextLine(); sValue sc.nextLine() sc.nextLine sc String[] sSplitStr = sValue.split(" "); sSplitStr sValue.split(" ") sValue.split sValue " " String sResult; sResult int iCnt1 = 0; iCnt1 0 int iCnt2 = 0; iCnt2 0 for (int i = 0; i < iNum; i++) {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    } int i = 0; int i = 0; i 0 i < iNum i iNum i++ i++ i {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    } {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    } int iOut = Integer.parseInt(sSplitStr[i]); iOut Integer.parseInt(sSplitStr[i]) Integer.parseInt Integer sSplitStr[i] sSplitStr i if (0 != (iOut % 2)) {
        continue;
      } 0 != (iOut % 2) 0 (iOut % 2) iOut 2 {
        continue;
      } continue; iCnt1++ iCnt1 if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      } 0 == (iOut % 3) || (0 == (iOut % 5)) 0 == (iOut % 3) 0 (iOut % 3) iOut 3 (0 == (iOut % 5)) 0 (iOut % 5) iOut 5 {
        iCnt2++;
      } iCnt2++ iCnt2 if (iCnt1 == iCnt2) {
      sResult = "APPROVED";
    } else {
      sResult = "DENIED";
    } iCnt1 == iCnt2 iCnt1 iCnt2 {
      sResult = "APPROVED";
    } sResult = "APPROVED" sResult "APPROVED" {
      sResult = "DENIED";
    } sResult = "DENIED" sResult "DENIED" System.out.print(sResult) System.out.print System.out System System.out sResult String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int iNum = sc.nextInt();
    sc.nextLine();
    String sValue = sc.nextLine();
    String[] sSplitStr = sValue.split(" ");
    String sResult;
    int iCnt1 = 0;
    int iCnt2 = 0;
    for (int i = 0; i < iNum; i++) {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    }
    if (iCnt1 == iCnt2) {
      sResult = "APPROVED";
    } else {
      sResult = "DENIED";
    }
    System.out.print(sResult);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int iNum = sc.nextInt();
    sc.nextLine();
    String sValue = sc.nextLine();
    String[] sSplitStr = sValue.split(" ");
    String sResult;
    int iCnt1 = 0;
    int iCnt2 = 0;
    for (int i = 0; i < iNum; i++) {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    }
    if (iCnt1 == iCnt2) {
      sResult = "APPROVED";
    } else {
      sResult = "DENIED";
    }
    System.out.print(sResult);
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int iNum = sc.nextInt();
    sc.nextLine();
    String sValue = sc.nextLine();
    String[] sSplitStr = sValue.split(" ");
    String sResult;
    int iCnt1 = 0;
    int iCnt2 = 0;
    for (int i = 0; i < iNum; i++) {
      int iOut = Integer.parseInt(sSplitStr[i]);
      if (0 != (iOut % 2)) {
        continue;
      }
      iCnt1++;
      if (0 == (iOut % 3) || (0 == (iOut % 5))) {
        iCnt2++;
      }
    }
    if (iCnt1 == iCnt2) {
      sResult = "APPROVED";
    } else {
      sResult = "DENIED";
    }
    System.out.print(sResult);
  }
}
