#include "stdio.h"

int main()
{
  int a, b, c, d;
  scanf ("%d",&a);
  scanf ("%d",&b);
  scanf ("%d",&c);
  scanf ("%d",&d);
  int i, j, at=1, aa=1, q1, q2;
  for (i=1; i<=100; i++)
    {
      at=at*b;
      if ((a-at) <= 0)
        {
          q1=i;
          break;
        }
    }
  for (i=1; i<=100; i++)
    {
      aa=aa*d;
      if ((c-aa) <= 0)
        {
          q2=i;
          break;
        }
    }
  if (q1 > q2)
    printf ("No\n");
  else
    printf ("Yes\n");
  return 0;
}