import java.util.*;

public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[] x = new int[N];
    for (int i = 0; i < N; i++) {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    }
    
    System.out.println("APPROVED");
  }
  public static boolean isMultiples(int multiples, int n) {
    return ((n % multiples) == 0);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[] x = new int[N];
    for (int i = 0; i < N; i++) {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    }
    
    System.out.println("APPROVED");
  }
  public static boolean isMultiples(int multiples, int n) {
    return ((n % multiples) == 0);
  }
} Main public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[] x = new int[N];
    for (int i = 0; i < N; i++) {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    }
    
    System.out.println("APPROVED");
  } main {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[] x = new int[N];
    for (int i = 0; i < N; i++) {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    }
    
    System.out.println("APPROVED");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] x = new int[N]; x new int[N] N for (int i = 0; i < N; i++) {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    } {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    } x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      } isMultiples(2, x[i]) isMultiples 2 x[i] x i {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      } if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        } isMultiples(3, x[i]) || isMultiples(5, x[i]) isMultiples(3, x[i]) isMultiples 3 x[i] x i isMultiples(5, x[i]) isMultiples 5 x[i] x i {
          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 static boolean isMultiples(int multiples, int n) {
    return ((n % multiples) == 0);
  } isMultiples {
    return ((n % multiples) == 0);
  } return ((n % multiples) == 0); ((n % multiples) == 0) (n % multiples) n multiples 0 int multiples multiples int n n public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[] x = new int[N];
    for (int i = 0; i < N; i++) {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    }
    
    System.out.println("APPROVED");
  }
  public static boolean isMultiples(int multiples, int n) {
    return ((n % multiples) == 0);
  }
} public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[] x = new int[N];
    for (int i = 0; i < N; i++) {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    }
    
    System.out.println("APPROVED");
  }
  public static boolean isMultiples(int multiples, int n) {
    return ((n % multiples) == 0);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    int[] x = new int[N];
    for (int i = 0; i < N; i++) {
      x[i] = sc.nextInt();
      if (isMultiples(2, x[i])) {
        if (isMultiples(3, x[i]) || isMultiples(5, x[i])) {
          continue;
        }
	    System.out.println("DENIED");
        return;
      }
    }
    
    System.out.println("APPROVED");
  }
  public static boolean isMultiples(int multiples, int n) {
    return ((n % multiples) == 0);
  }
}