import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String[] inputs = reader.readLine().split(" "); int X = Integer.parseInt(inputs[0]); int Y = Integer.parseInt(inputs[1]); double X1 = X * 1000 / 360.0; double Y1 = Y * 1000 / 360.0; int N = Integer.parseInt(reader.readLine()); inputs = reader.readLine().split(" "); boolean result = true; for (int i = 0; i < N - 1; i++) { int first = Integer.parseInt(inputs[i]); int second = Integer.parseInt(inputs[i + 1]); double tmp = (double) first / X1; if (tmp * Y1 > second) { result = false; break; } } if(result) { System.out.println("YES"); } else { System.out.println("NO"); } } }