#include int main(int argc, char const *argv[]) { int x=0,y=0,n=0,p=0; // X < Y double temp=0; scanf("%d %d",&x,&y); scanf("%d",&n); int a[n]; for (size_t i = 0; i < n; i++) { scanf("%d",&a[i]); } x=x*1000/3600;y=y*1000/3600; for (size_t i = 1; i < n; i++) { temp=a[i]*x/y; if(temp < a[i-1]){ p=1; printf("%lf < %d a[i]=%d X=%d Y=%d n=%d",temp,a[i-1],a[i],x,y,n); break; }else{ p=0; } } if(p==1){ printf("NO\n"); }else{ printf("YES\n"); } return 0; }