import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.*;
 
public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    StringTokenizer stk = new StringTokenizer(in.readLine());
    in.close();
    int a[] = new int[n];
    boolean flg = true;
    for(int cnt = 0; cnt<n; cnt++){
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    }
    if(flg == true)
      System.out.println("APPROVED");
    else
      System.out.println("DENIED");
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io import java.util.*; util.* java public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    StringTokenizer stk = new StringTokenizer(in.readLine());
    in.close();
    int a[] = new int[n];
    boolean flg = true;
    for(int cnt = 0; cnt<n; cnt++){
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    }
    if(flg == true)
      System.out.println("APPROVED");
    else
      System.out.println("DENIED");
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    StringTokenizer stk = new StringTokenizer(in.readLine());
    in.close();
    int a[] = new int[n];
    boolean flg = true;
    for(int cnt = 0; cnt<n; cnt++){
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    }
    if(flg == true)
      System.out.println("APPROVED");
    else
      System.out.println("DENIED");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    StringTokenizer stk = new StringTokenizer(in.readLine());
    in.close();
    int a[] = new int[n];
    boolean flg = true;
    for(int cnt = 0; cnt<n; cnt++){
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    }
    if(flg == true)
      System.out.println("APPROVED");
    else
      System.out.println("DENIED");
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in StringTokenizer stk = new StringTokenizer(in.readLine()); stk new StringTokenizer(in.readLine()) in.close() in.close in int a[] = new int[n]; a new int[n] n boolean flg = true; flg true for(int cnt = 0; cnt<n; cnt++){
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    } int cnt = 0; int cnt = 0; cnt 0 cnt<n cnt n cnt++ cnt++ cnt {
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    } {
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    } a[cnt] = Integer.parseInt(stk.nextToken()) a[cnt] a cnt Integer.parseInt(stk.nextToken()) Integer.parseInt Integer stk.nextToken() stk.nextToken stk if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      } a[cnt]%2==0 a[cnt]%2 a[cnt] a cnt 2 0 {
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      } if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false; a[cnt]%3!=0 && a[cnt]%5!=0 a[cnt]%3!=0 a[cnt]%3 a[cnt] a cnt 3 0 a[cnt]%5!=0 a[cnt]%5 a[cnt] a cnt 5 0 flg = false flg false if(flg == true)
      System.out.println("APPROVED");
    else
      System.out.println("DENIED"); flg == true flg true System.out.println("APPROVED") System.out.println System.out System System.out "APPROVED" System.out.println("DENIED") System.out.println System.out System System.out "DENIED" String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    StringTokenizer stk = new StringTokenizer(in.readLine());
    in.close();
    int a[] = new int[n];
    boolean flg = true;
    for(int cnt = 0; cnt<n; cnt++){
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    }
    if(flg == true)
      System.out.println("APPROVED");
    else
      System.out.println("DENIED");
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    StringTokenizer stk = new StringTokenizer(in.readLine());
    in.close();
    int a[] = new int[n];
    boolean flg = true;
    for(int cnt = 0; cnt<n; cnt++){
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    }
    if(flg == true)
      System.out.println("APPROVED");
    else
      System.out.println("DENIED");
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.*;
 
public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    StringTokenizer stk = new StringTokenizer(in.readLine());
    in.close();
    int a[] = new int[n];
    boolean flg = true;
    for(int cnt = 0; cnt<n; cnt++){
      a[cnt] = Integer.parseInt(stk.nextToken());
      if(a[cnt]%2==0){
        if(a[cnt]%3!=0 && a[cnt]%5!=0)
          flg = false;
      }
    }
    if(flg == true)
      System.out.println("APPROVED");
    else
      System.out.println("DENIED");
  }
}