#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
int main() {
  int Begin, End, up, down;
  scanf("%d%d%d%d", &Begin, &End, &up, &down);
  int day0 = 8 * up;
  int day;
  if (up - down <= 0) {
    if (End - Begin - day0 <= 0)
      day = 0;
    else
      day = -1;
  } else {
    if (End - Begin - day0 <= 0)
      day = 0;
    else {
      if ((End - Begin - day0) % (12 * (up - down)) == 0)
        day = (End - Begin - day0) / (12 * (up - down));
      else
        day = (End - Begin - day0) / (12 * (up - down)) + 1;
    }
  }
  cout << day;
  return 0;
}
