The 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the height h_1 cm from the ground. On the height h_2 cm (h_2 > h_1) on the same tree hung an apple and the caterpillar was crawling to the apple.

Gabriel is interested when the caterpillar gets the apple. He noted that the caterpillar goes up by a cm per hour by day and slips down by b cm per hour by night.

In how many days Gabriel should return to the forest to see the caterpillar get the apple. You can consider that the day starts at 10 am and finishes at 10 pm. Gabriel's classes finish at 2 pm. You can consider that Gabriel noticed the caterpillar just after the classes at 2 pm.

Note that the forest is magic so the caterpillar can slip down under the ground and then lift to the apple.


-----Input-----

The first line contains two integers h_1, h_2 (1 ≤ h_1 < h_2 ≤ 10^5) — the heights of the position of the caterpillar and the apple in centimeters.

The second line contains two integers a, b (1 ≤ a, b ≤ 10^5) — the distance the caterpillar goes up by day and slips down by night, in centimeters per hour.


-----Output-----

Print the only integer k — the number of days Gabriel should wait to return to the forest and see the caterpillar getting the apple.

If the caterpillar can't get the apple print the only integer  - 1.


-----Examples-----
Input
10 30
2 1

Output
1

Input
10 13
1 1

Output
0

Input
10 19
1 2

Output
-1

Input
1 50
5 4

Output
1



-----Note-----

In the first example at 10 pm of the first day the caterpillar gets the height 26. At 10 am of the next day it slips down to the height 14. And finally at 6 pm of the same day the caterpillar gets the apple.

Note that in the last example the caterpillar was slipping down under the ground and getting the apple on the next day.

Difficulty: MEDIUM

Solutions:
(h1, h2) = map(int, input().split(' '))
h = h2 - h1
(a, b) = map(int, input().split())
h -= a * 8
if h <= 0:
	print(0)
elif a <= b:
	print(-1)
else:
	print(h // (12 * (a - b)) + (1 if h % (12 * (a - b)) else 0))


import math
(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
if h1 + a * 8 >= h2:
	print(0)
elif a <= b:
	print(-1)
else:
	print(math.ceil((h2 - h1 - 8 * a) / (12 * (a - b))))


def main():
	(h1, h2) = (int(x) for x in input().split())
	(a, b) = (int(x) for x in input().split())
	print(solver(h1, h2, a, b))

def solver(h1, h2, a, b):
	if a <= b:
		if a * 8 >= h2 - h1:
			return 0
		else:
			return -1
	else:
		h = h1 + a * 8
		if h >= h2:
			return 0
		else:
			dayClimb = 12 * (a - b)
			return (h2 - h - 1) // dayClimb + 1
main()


import math
(h1, h2) = map(int, input().split())
(r, f) = map(int, input().split())
if h1 + r * 8 >= h2:
	print(0)
elif f >= r:
	print(-1)
else:
	print(math.ceil((h2 - h1 - 8 * r) / (12 * (r - f))))


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
if h1 + a * 8 >= h2:
	print(0)
	exit(0)
if a <= b:
	print(-1)
	exit(0)
mn = 12 * (a - b)
h = h2 - h1 - 8 * a
print(-(-h // mn))


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
if a <= b and h2 - h1 > 8 * a:
	print(-1)
elif h2 - h1 <= 8 * a:
	print(0)
else:
	ans = (h2 - h1 - 8 * a) // (12 * (a - b))
	if (h2 - h1 - 8 * a) % (12 * (a - b)) == 0:
		print(ans)
	else:
		print(ans + 1)


(h1, h2) = list(map(int, input().split(' ')))
(a, b) = list(map(int, input().split(' ')))
if h1 + 8 * a >= h2:
	print(0)
elif a <= b:
	print(-1)
else:
	cnt = 0
	h1 += 8 * a
	while h1 < h2:
		h1 += 12 * (a - b)
		cnt += 1
	print(cnt)


(h1, h2) = tuple(map(int, input().split()))
(a, b) = tuple(map(int, input().split()))
day = 0
r = a * 8 + h1
if a <= b and r < h2:
	day = -1
elif a <= b and r < h2:
	day = -1
else:
	while r < h2:
		r = r - b * 12
		r = r + a * 12
		day = day + 1
print(day)


'__author__' == 'deepak Singh Mehta) '
(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
h1 += a * 8
if h1 >= h2:
	print(0)
else:
	h1 -= b * 12
	if b >= a:
		print(-1)
	else:
		day = 0
		while True:
			day += 1
			h1 += a * 4
			h1 += a * 8
			if h1 >= h2:
				print(day)
				break
			h1 -= b * 12


import sys
(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
if h1 + 8 * a >= h2:
	print(0)
	exit()
h1 += 8 * a - 12 * b
if h1 + 12 * a >= h2:
	print(1)
	exit()
if a <= b:
	print(-1)
	exit()
delta = 12 * a - 12 * b
print((h2 - h1 - 12 * a + delta - 1) // delta + 1)


from collections import deque, defaultdict, Counter
from itertools import product, groupby, permutations, combinations
from math import gcd, floor, inf
from bisect import bisect_right, bisect_left
(h1, h2) = map(int, input().split())
h2 -= h1
(a, b) = map(int, input().split())
if a <= b and h2 > a * 8:
	print(-1)
elif a * 8 >= h2:
	print(0)
else:
	h2 -= 8 * a
	dif = (a - b) * 12
	ans = 0
	while h2 > 0:
		h2 -= dif
		ans += 1
	print(ans)


[h_1, h_2] = [int(x) for x in input().split(' ')]
[a, b] = [int(y) for y in input().split(' ')]
k = 0
p_0 = h_1 + (10 - 2) * a
if h_2 > p_0:
	if a <= b:
		k = -1
	else:
		while h_2 > p_0:
			p_0 += 12 * (a - b)
			k += 1
print(k)


def pillar():
	temp = input().split()
	bugHeight = int(temp[0])
	appleHeight = int(temp[1])
	temp = input().split()
	dayRate = int(temp[0])
	nightRate = int(temp[1])
	if dayRate * 8 + bugHeight >= appleHeight:
		return 0
	else:
		bugHeight += dayRate * 8 - nightRate * 12
		if bugHeight + dayRate * 12 < appleHeight and nightRate >= dayRate:
			return -1
		if appleHeight - (bugHeight + 12 * dayRate) <= 0:
			return 1
		temp = (appleHeight - (bugHeight + 12 * dayRate)) / (dayRate * 12.0 - 12 * nightRate)
		if temp == int(temp):
			return int(temp) + 1
		return int(temp) + 2
print(pillar())


(h1, h2) = map(int, input().split())
(inc, dec) = map(int, input().split())
temp = h1
j = 1
if inc <= dec and h1 + inc * 8 < h2:
	print(-1)
	exit(0)
h1 += inc * 8
if h1 >= h2:
	print(0)
	exit(0)
h1 -= dec * 12
while h1 < h2:
	h1 += inc * 12
	if h1 >= h2:
		break
	h1 -= dec * 12
	j += 1
print(j)


class StdReader:

	def read_int(self):
		return int(self.read_string())

	def read_ints(self, sep=None):
		return [int(i) for i in self.read_strings(sep)]

	def read_float(self):
		return float(self.read_string())

	def read_floats(self, sep=None):
		return [float(i) for i in self.read_strings(sep)]

	def read_string(self):
		return input()

	def read_strings(self, sep=None):
		return self.read_string().split(sep)
reader = StdReader()

def main():
	(h1, h2) = reader.read_ints()
	(a, b) = reader.read_ints()
	if h1 + a * (22 - 14) >= h2:
		print(0)
		return
	if a <= b:
		print(-1)
		return
	h1 = h1 + a * (22 - 14)
	dh = (a - b) * 12
	days = (h2 - h1) // dh + ((h2 - h1) % dh != 0)
	print(days)
main()


def caterpillar(h1, h2, a, b):
	h1 += 8 * a
	if h1 >= h2:
		return 0
	if a <= b:
		return -1
	d = 12 * (a - b)
	dh = h2 - h1
	return (dh - 1) // d + 1

def main():
	(h1, h2) = readinti()
	(a, b) = readinti()
	print(caterpillar(h1, h2, a, b))
import sys

def readint():
	return int(input())

def readinti():
	return map(int, input().split())

def readintl():
	return list(readinti())

def readintll(k):
	return [readintl() for _ in range(k)]

def log(*args, **kwargs):
	print(*args, **kwargs, file=sys.stderr)
main()


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
h1 += a * 8
if h1 >= h2:
	print(0)
else:
	h1 -= b * 12
	if b >= a:
		print(-1)
	else:
		day = 0
		while True:
			day += 1
			h1 += a * 4
			h1 += a * 8
			if h1 >= h2:
				print(day)
				break
			h1 -= b * 12


(h1, h2) = list(map(int, input().split(' ')))
(a, b) = list(map(int, input().split(' ')))
if h1 + 8 * a >= h2:
	print(0)
elif a <= b:
	print(-1)
else:
	dis = h2 - h1 - 8 * a
	inc = (a - b) * 12
	print((dis + inc - 1) // inc)


def dprint(str):
	pstatus = False
	if pstatus == True:
		print(str)

def check_cat():
	from math import ceil
	from operator import add
	h_string = input()
	speed_string = input()
	(h_cat, h_app) = map(int, h_string.split())
	(day_up, day_down) = map(int, speed_string.split())
	day_sub = [4 * day_up, 8 * day_up, -12 * day_down]
	flag = False
	day_loc = [0, h_cat]
	current_pos = day_loc[1]
	day_counter = 0
	i1 = 0
	if sum(day_sub) <= 0:
		if h_cat + day_sub[1] >= h_app:
			return 0
		else:
			return -1
	while not flag:
		if current_pos >= h_app:
			flag = True
			break
		else:
			i1 += 1
			current_pos += day_sub[i1 % 3]
			day_loc.append(current_pos)
	dprint(day_loc)
	day_counter = i1
	dprint(day_counter)
	dprint(day_counter % 3)
	return int(day_counter / 3)
output = check_cat()
print(output)


def main():
	(a, b) = list(map(int, input().split()))
	h = b - a
	(a, b) = list(map(int, input().split()))
	h -= a * 8
	if h <= 0:
		res = 0
	elif a <= b:
		res = -1
	else:
		a = (a - b) * 12
		res = (h + a - 1) // a
	print(res)

def __starting_point():
	main()
__starting_point()


import traceback
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math
from collections import defaultdict as dfd, Counter
from functools import lru_cache
from itertools import accumulate

def geti():
	return int(input())

def gets():
	return input()

def getil():
	return list(map(int, input().split()))

def getsl():
	return input().split()

def getinps(s):
	inps = s.split()
	m = {'i': geti, 's': gets, 'il': getil, 'sl': getsl}
	if len(inps) == 1:
		return m[s]()
	return [m[k]() for k in inps]

def get2d(nrows, ncols, n=0):
	return [[n] * ncols for r in range(nrows)]

def get_acc(a):
	return list(accumulate(a))

def get_ncr(n, r):
	if n < r:
		return 0
	return math.factorial(n) // (math.factorial(r) * math.factorial(n - r))

def get_nc2(n):
	return n * (n - 1) // 2

def get_npr(n, r):
	if n < r:
		return 0
	return math.factorial(n) // math.factorial(r)

def ceil(n):
	return int(math.ceil(n))
inf = float('inf')
mod = 10 ** 9 + 7

def main():
	((st, end), (a, b)) = getinps('il il')
	dist = end - st
	dist -= 8 * a
	if dist <= 0:
		return 0
	if a <= b:
		return -1
	dist += 12 * b
	k = max(0, ceil((dist - 12 * a) / (12 * (a - b)))) + 1
	return k
try:
	ans = main()
	print(ans)
except Exception as e:
	print(e)
	traceback.print_exc()


from math import ceil
(h1, h2) = list(map(int, input().split()))
(a, b) = list(map(int, input().split()))
x = h2 - h1
p = 0
for i in range(8):
	p += a
	if p >= x:
		print(0)
		return
for i in range(100000):
	for j in range(12):
		if i & 1:
			p += a
		else:
			p -= b
		if p >= x:
			print(ceil(i / 2))
			return
print(-1)


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
day = 0
h1 += 8 * a
if h1 >= h2:
	print(day)
	exit()
h1 -= 12 * b
if h1 + 12 * a < h2 and a <= b:
	print(-1)
else:
	while True:
		h1 += 12 * a
		day += 1
		if h1 >= h2:
			print(day)
			exit()
		h1 -= 12 * b


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
d = 0
r = h1
while True:
	h1 += 8 * a
	if h1 >= h2:
		print(d)
		exit(0)
	d += 1
	h1 = h1 - 12 * b + 4 * a
	if d > 1 and h1 <= r:
		print('-1')
		exit(0)


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
x = h1 + 8 * a
if x >= h2:
	print(0)
else:
	x -= b * 2
	flg = 0
	for i in range(1, 100000):
		x -= b * 10
		x += a * 12
		if x >= h2:
			print(i)
			flg = 1
			break
		x -= b * 2
	if flg == 0:
		print(-1)


(h, g) = map(int, input().split())
(a, b) = map(int, input().split())
ans = 0
h += a << 3
uph = h
while g > h:
	ans += 1
	h += 12 * (a - b)
	if h <= uph:
		ans = -1
		break
	uph = h
print(ans)


line = input().split()
h1 = int(line[0])
h2 = int(line[1])
line = input().split()
a = int(line[0])
b = int(line[1])
if a <= b:
	if h1 + 8 * a >= h2:
		print(0)
	else:
		print(-1)
else:
	slips = 0
	while True:
		if h1 + 8 * a + slips * 12 * (a - b) >= h2:
			print(slips)
			break
		slips += 1


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
hc = h1
if b >= a and h2 > h1 + 8 * a:
	print(-1)
else:
	d = 0
	hc = h1 + 8 * a
	while hc < h2:
		d += 1
		hc += 12 * a - 12 * b
	print(d)


from collections import *
import os, sys
from io import BytesIO, IOBase

def main():
	(h1, h2) = rints()
	(a, b) = rints()
	h1 += 8 * a
	if h1 >= h2:
		print(0)
	elif a <= b:
		print(-1)
	else:
		print(ceil1(h2 - h1, 12 * (a - b)))

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
BUFSIZE = 8192
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
rstr = lambda : input().strip()
rstrs = lambda : [str(x) for x in input().split()]
rstr_2d = lambda n: [rstr() for _ in range(n)]
rint = lambda : int(input())
rints = lambda : [int(x) for x in input().split()]
rint_2d = lambda n: [rint() for _ in range(n)]
rints_2d = lambda n: [rints() for _ in range(n)]
ceil1 = lambda a, b: (a + b - 1) // b
main()


from math import *
(h1, h2) = [int(i) for i in input().split()]
(a, b) = [int(i) for i in input().split()]
a *= 12
b *= 12
if a <= b and h2 - h1 > a // 12 * 8:
	print(-1)
	exit()
h1 += a // 12 * 8
if h1 >= h2:
	print(0)
	exit()
day = int(ceil((h2 - h1) / (a - b)))
print(day)


import math
(h1, h2) = map(int, input().split())
(day, night) = map(int, input().split())
if h2 - h1 <= day * 8:
	print(0)
elif h2 - h1 - day * 8 + night * 12 - day * 12 <= 0:
	print(1)
elif day - night <= 0:
	print(-1)
else:
	print(int(math.ceil((h2 - h1 - day * 20 + night * 12) / ((day - night) * 12))) + 1)


def solve():
	(h1, h2) = map(int, input().split())
	(a, b) = map(int, input().split())
	h3 = h1 + a * 8
	if h3 >= h2:
		print(0)
		return
	if b >= a:
		print(-1)
		return
	h4 = h2 - h3
	c = (a - b) * 12
	ans = int((h4 + (c - 1)) / c)
	print(ans)
solve()


import sys
(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
h1 += 8 * a
if h1 >= h2:
	print(0)
	sys.exit(0)
if b >= a:
	print(-1)
	sys.exit(0)
ans = 1
while True:
	h1 -= 12 * b
	h1 += 12 * a
	if h1 >= h2:
		break
	ans += 1
print(ans)


(a, b) = map(int, input().split())
(c, d) = map(int, input().split())
f = 0
a = a - c * 4
while True:
	a += c * 12
	if a >= b:
		break
	elif d >= c:
		f = -1
		break
	else:
		a -= d * 12
	f += 1
print(f)


import sys
(h1, h2) = [int(x) for x in input().split()]
(a, b) = [int(x) for x in input().split()]
if a == b and h1 + 8 * a < h2:
	print(-1)
	sys.exit(0)
if h1 + 8 * a >= h2:
	print(0)
	sys.exit(0)
if b > a:
	print(-1)
	sys.exit(0)
rest = h2 - h1 - 8 * a
div = 12 * (a - b)
result = rest // div
if rest % div > 0:
	result += 1
print(result)


from math import ceil
(h1, h2) = [int(x) for x in input().split()]
(a, b) = [int(x) for x in input().split()]
atual = h2 - h1 - a * 8
if atual <= 0:
	print(0)
elif a <= b:
	print(-1)
else:
	print(ceil(atual / (12 * (a - b))))


arr = list(map(int, input().split()))
h1 = arr[0]
h2 = arr[1]
arr = list(map(int, input().split()))
a = arr[0]
b = arr[1]
k = 0
if h1 + 8 * a >= h2:
	print(k)
else:
	h1 = h1 + 8 * a - 12 * b
	k = 1
	if h1 + 12 * a >= h2:
		print(k)
	elif b >= a:
		print(-1)
	else:
		k = 2
		h1 = h1 + 12 * a - 12 * b
		while h2 - h1 > 12 * a:
			h1 += 12 * (a - b)
			k += 1
		print(k)


import sys
(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
r = a
if h2 < h1:
	print('false')
day = 0
r = a * 8 + h1
if a <= b and a * 8 + h1 < h2:
	day = -1
else:
	while r < h2:
		r = r - b * 12
		r = r + a * 12
		day = day + 1
print(day)


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
h = h1
ans = 0
while True:
	h += 8 * a
	if h2 <= h:
		break
	h -= 12 * b
	h += 4 * a
	if h <= h1:
		ans = -1
		break
	ans += 1
print(ans)


(h1, h2) = map(int, input().split())
diffe = h2 - h1
(a, b) = map(int, input().split())
if h1 + a * 8 >= h2:
	print(0)
elif a > b:
	num = h2 - h1 - 8 * a
	den = 12 * (a - b)
	print(int((num + den - 1) / den))
else:
	print(-1)


import math
(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
if h1 + 8 * a >= h2:
	print(0)
elif a <= b:
	print(-1)
else:
	d = 0
	h1 += 8 * a - 12 * b
	while True:
		d += 1
		h1 += 12 * a
		if h1 >= h2:
			break
		h1 -= 12 * b
	print(d)


import math
(h1, h2) = map(int, input().strip().split(' '))
(x, y) = map(int, input().strip().split(' '))
gap = h2 - h1
if gap <= 8 * x:
	print(0)
else:
	gap = h2 - (h1 + 8 * x - 12 * y)
	if y >= x:
		print(-1)
	else:
		i = 1
		while True:
			if 12 * x >= gap:
				print(i)
				break
			else:
				i += 1
				gap -= 12 * (x - y)


f = lambda : map(int, input().split())
(x, y) = f()
(a, b) = f()
h = y - x - 8 * a - 1
d = 12 * (a - b)
print(0 if h < 0 else h // d + 1 if a > b else -1)


import sys
from bisect import bisect_right as rb
from collections import deque
from queue import PriorityQueue
from math import *
input_ = lambda : sys.stdin.readline().strip('\r\n')
ii = lambda : int(input_())
il = lambda : list(map(int, input_().split()))
ilf = lambda : list(map(float, input_().split()))
ip = lambda : input_()
fi = lambda : float(input_())
ap = lambda ab, bc, cd: ab[bc].append(cd)
li = lambda : list(input_())
pr = lambda x: print(x)
prinT = lambda x: print(x)
f = lambda : sys.stdout.flush()
mod = 998244353
(h1, h2) = il()
(a, b) = il()
if h1 + a * 8 >= h2:
	print(0)
	exit(0)
if a <= b:
	print(-1)
	exit(0)
mn = 12 * (a - b)
h = h2 - h1 - 8 * a
print(-(-h // mn))


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
if b >= a and h2 - h1 > 8 * a:
	print(-1)
elif h2 - h1 <= 8 * a:
	print(0)
else:
	ans = 20
	h1 += 8 * a
	h1 = h1 - 12 * b
	f = False
	while h2 > h1:
		if f == False:
			for i in range(1, 13):
				if h2 > h1:
					h1 += a
					ans += 1
				else:
					f = True
					break
		if f == False:
			for i in range(1, 13):
				if h2 > h1:
					h1 -= b
					ans += 1
				else:
					f = True
					break
	if ans % 24 == 21 or ans % 24 == 22 or ans % 24 == 23:
		print(1 + ans // 24)
	else:
		print(ans // 24)


s = input()
S = s.split()
h1 = int(S[0])
h2 = int(S[1])
s = input()
S = s.split()
a = int(S[0])
b = int(S[1])
time = 14
if h1 + a * 8 < h2 and a * 12 <= b * 12:
	print('-1')
elif h1 + a * 8 >= h2:
	print('0')
else:
	h1 += a * 8
	h1 -= b * 12
	h1 += a * 12
	if h1 >= h2:
		print('1')
	elif (h2 - h1) / (a * 12 - b * 12) > int((h2 - h1) / (a * 12 - b * 12)):
		print(int((h2 - h1) / (a * 12 - b * 12)) + 2)
	else:
		print(int((h2 - h1) / (a * 12 - b * 12)) + 1)


import itertools

def divceil(a, b):
	return (a + b - 1) // b

def solve(h1, h2, a, b):
	if a - b <= 0:
		return 0 if divceil(h2 - h1, a) <= 8 else -1
	h = h1
	h += a * 8
	if h >= h2:
		return 0
	h -= b * 12
	for i in itertools.count(1):
		h += a * 12
		if h >= h2:
			return i
		h -= b * 12

def main():
	(h1, h2) = map(int, input().split())
	(a, b) = map(int, input().split())
	print(solve(h1, h2, a, b))
main()


x = input().split()
y = input().split()
dif = int(x[1]) - int(x[0])
cnt = 0
if dif - int(y[0]) * 8 <= 0:
	print(0)
elif int(y[0]) - int(y[1]) > 0:
	dif = dif - int(y[0]) * 8 + int(y[1]) * 12
	while dif > 0:
		dif -= int(y[0]) * 12
		if dif <= 0:
			cnt += 1
			break
		else:
			cnt += 1
			dif += int(y[1]) * 12
	print(cnt)
else:
	print(-1)


from sys import stdin, stdout
input = stdin.readline

def main():
	t = 1
	for i in range(t):
		(h1, h2) = map(int, input().split())
		(a, b) = map(int, input().split())
		h1 = 8 * a + h1
		if h1 >= h2:
			print(0)
			return
		if b >= a:
			print(-1)
			return
		ch = a - b
		ch *= 12
		h2 -= h1
		print((h2 + ch - 1) // ch)
main()


(h, g) = [int(x) for x in input().split(' ')]
(a, b) = [int(x) for x in input().split(' ')]
ans = 0
h += 8 * a
uph = h
while g > h:
	ans += 1
	h += 12 * (a - b)
	if h <= uph:
		ans = -1
		break
	uph = h
print(ans)


x = list(map(int, input().split()))
(h1, h2) = (x[0], x[1])
h = h2 - h1
y = list(map(int, input().split()))
(a, b) = (y[0], y[1])
if a <= b:
	if h / a > 8:
		print(-1)
	else:
		print(0)
elif h / a <= 8:
	print(0)
else:
	t = 8
	h = h - 8 * a
	t0 = 24 * (h // (-12 * b + 12 * a))
	t += t0
	h -= t0 * 0.5 * (a - b)
	if h != 0:
		t += 12
		h += 12 * b
		t += h / a
		print(int((t + 14) // 24))
	else:
		print(int((t + 14) // 24))


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
day = 0
while h1 < h2:
	if day == 0:
		h1 += a * 8
		if h1 < h2 and b >= a:
			print(-1)
			break
		elif h1 < h2:
			h1 -= b * 12
			day += 1
		while h1 < h2:
			h1 += a * 12
			if h1 < h2:
				h1 -= b * 12
				day += 1
		print(day)


x = input().split()
h1 = int(x[0])
h2 = int(x[1])
x = input().split()
a = int(x[0])
b = int(x[1])
h1 = h1 + a * 8
if h1 >= h2:
	print(0)
elif a > b:
	day = 1
	while day > 0:
		h1 = h1 - 12 * b
		h1 = h1 + 12 * a
		if h1 >= h2:
			print(day)
			break
		day = day + 1
else:
	print(-1)


(h1, h2) = list(map(int, input().split(' ')))
(a, b) = list(map(int, input().split(' ')))

def caterpillar(a, b, h1, h2):
	if h1 + 8 * a >= h2:
		print(0)
	else:
		h = h1 + 8 * a
		if 12 * (a - b) <= 0:
			print(-1)
		else:
			c = h2 - h
			d = 12 * (a - b)
			print(c // d + (c % d > 0) * 1)
caterpillar(a, b, h1, h2)


import math
(n, h) = map(int, input().split())
h -= n
n = 0
(a, b) = map(int, input().split())
if a <= b:
	if h > a * 8:
		print(-1)
	else:
		print(0)
elif h <= a * 8:
	print(0)
else:
	ans = 0
	h -= a * 8
	while n < h:
		n -= 12 * b
		n += 12 * a
		ans += 1
	print(ans)


ch = input()
d = ch.split()
h1 = int(d[0])
h2 = int(d[1])
ch = input()
d1 = ch.split()
a = int(d1[0])
b = int(d1[1])
S = 2
D = 0
if h1 < h2:
	if b > a and 8 * a < h2 - h1:
		print(-1)
	elif b == a and 8 * a < h2 - h1:
		print(-1)
	elif h1 < h2:
		if 8 * a >= h2 - h1:
			print(0)
		else:
			h1 += a * 8
			h1 -= b * 12
			D += 1
		while h1 < h2:
			if h1 + a * 12 >= h2:
				break
			h1 += (a - b) * 12
			D += 1
		if D != 0:
			print(D)
else:
	h1 + 8 * a
	if a > b and 12 * b < h1 - h2:
		print(-1)
	elif b == a and b * 12 < 8 * a + h1 - h2:
		print(-1)
	elif h1 > h2:
		if 12 * b >= h1 - h2:
			print(0)
		else:
			h2 += a * 12
			h2 -= b * 12
			D += 1
		while h1 > h2:
			if h2 - b * 12 >= h1:
				break
			h2 += (b - a) * 12
			D += 1
		if D != 0:
			print(D)


[h1, h2] = list(map(int, input().split()))
[a, b] = list(map(int, input().split()))
if h1 + 8 * a >= h2:
	print(0)
	exit(0)
elif a <= b:
	print(-1)
	exit(0)
d = h1 + 8 * a
res = int((h2 - d + 12 * (a - b) - 1) / (12 * (a - b)))
print(res)


import sys
import bisect
from bisect import bisect_left as lb
input_ = lambda : sys.stdin.readline().strip('\r\n')
from math import log
from math import gcd
from math import atan2, acos
from random import randint
sa = lambda : input_()
sb = lambda : int(input_())
sc = lambda : input_().split()
sd = lambda : list(map(int, input_().split()))
se = lambda : float(input_())
sf = lambda : list(input_())
flsh = lambda : sys.stdout.flush()
mod = 10 ** 9 + 7
gp = []
cost = []
dp = []
mx = []
ans1 = []
ans2 = []
special = []
specnode = []
a = 0
kthpar = []

def dfs(root, par):
	if par != -1:
		dp[root] = dp[par] + 1
	for i in range(1, 20):
		if kthpar[root][i - 1] != -1:
			kthpar[root][i] = kthpar[kthpar[root][i - 1]][i - 1]
	for child in gp[root]:
		if child == par:
			continue
		kthpar[child][0] = root
		dfs(child, root)

def hnbhai():
	(h1, h2) = sd()
	(a, b) = sd()
	if h1 + 8 * a >= h2:
		print(0)
		return
	if a <= b:
		print(-1)
		return
	rel = 12 * (a - b)
	final = h2 - h1 - 8 * a
	print(-(-final // rel))
for _ in range(1):
	hnbhai()


(h1, h2) = map(int, input().split())
(up, down) = map(int, input().split())
v = up - down
if v <= 0:
	if h2 - h1 <= 8 * up:
		print(0)
	else:
		print(-1)
else:
	days = 0
	h1 += 8 * up
	while h1 < h2:
		h1 -= 12 * down
		h1 += 12 * up
		days += 1
	print(days)


import sys
(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
day = 12
night = 12
first_part = 8
if a * 8 + h1 >= h2:
	print(0)
	sys.exit()
if a <= b:
	print(-1)
	sys.exit()
cur = h1 + a * 8
d = h2 - cur
days = d // (12 * a - 12 * b)
ost = d % (12 * a - 12 * b)
if ost == 0:
	print(days)
else:
	print(days + 1)


(H1, H2) = map(int, input().split())
(A, B) = map(int, input().split())
num = H2 - H1 - 8 * A
den = 12 * (A - B)
if den > 0:
	ans = max(0, (num + den - 1) // den)
else:
	ans = 0 if num <= 0 else -1
print(ans)


(h1, h2) = input().split()
h1 = int(h1)
h2 = int(h2)
(a, b) = input().split()
a = int(a)
b = int(b)
d = 0
k = 8 * a + h1
if k >= h2:
	print(d)
else:
	k = k - b * 12
	if b > a:
		print('-1')
	elif b == a and k <= h1:
		print('-1')
	else:
		while 1 < 2:
			d = d + 1
			k = k + 12 * a
			if k >= h2:
				break
			k = k - 12 * b
		print(d)


string = input()
(h1, h2) = string.split()
h1 = int(h1)
h2 = int(h2)
string = input()
(a, b) = string.split()
a = int(a)
b = int(b)
try:
	c = h1 + 8 * a
	if c >= h2:
		result = 0
	else:
		result = (h2 - c - 1) // (12 * (a - b))
		if result >= 0:
			result += 1
		else:
			result = -1
		if b > a:
			result = -1
except ZeroDivisionError:
	result = -1
print(result)


(h1, h2) = map(int, input().split())
(a, b) = map(int, input().split())
(d, v) = (h2 - h1 - 8 * a, 12 * (a - b))
if d <= 0:
	print(0)
elif b >= a:
	print(-1)
else:
	print((d + v - 1) // v)