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 h1 cm from the ground. On the height h2 cm (h2 > h1) 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.

The first line contains two integers h1, h2 (1 ≤ h1 < h2 ≤ 105) — the heights of the position of the caterpillar and the apple in centimeters. The second line contains two integers a, b (1 ≤ a, b ≤ 105) — the distance the caterpillar goes up by day and slips down by night, in centimeters per hour.

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.

NoteIn 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.

var
  h1, h2, a, b, k, hour, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a <=b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;

  hev := 8 * a + h1;
  if hev>=h2 then begin
  write('0');
  Halt;
  end;
  hour := a-b;
  for k := 1 to 10000001 do
    if hev + 12*k*hour >= h2 then begin
      write(k);
      Halt;
    end;
end.

Const Finp='';
      Fout='';
Var h1,h2,a,b:longint;

Procedure Nhap;
Var f:Text;
Begin
    assign(f,finp); reset(f);
    readln(f,h1,h2);
    read(f,a,b);
    close(f);
End;
Function Solve:longint;
Var res,temp:longint;
Begin
    if h1+8*a>=h2 then
        exit(0);
    if (h1+8*a<h2) and (a<=b) then
        exit(-1);
    res:=(h2-h1-8*a) div (12*(a-b));
    if (h2-h1-8*a) mod (12*(a-b))<>0 then
        res:=res+1;
    solve:=res;
End;
Procedure Xuat;
Var f:Text;
Begin
    assign(f,fout); rewrite(f);
    write(f,solve);
    close(f);
End;

Begin
    nhap;
    xuat;
End.

var  h1,h2,a,b,ans:longint;
begin
    readln(h1,h2);
    readln(a,b);
    inc(h1,8*a);
    if h1>=h2 then begin
        writeln(0);
        halt;
    end;
    if (h1<h2)and(a<=b)then begin
        writeln(-1);
        halt;
    end;
    repeat
        dec(h1,12*b) ;
         inc(ans);
         inc(h1,12*a);
         if h1>=h2 then begin
             writeln(ans);
             halt;
         end;
    until false;
end.

Var a,b,n,m,x,o,l,t,day,pr:LongInt;
  Begin
    Read(n,m,a,b);
    t:=14;
    While n<m do
      Begin
        x:=22-t;
        n:=n+x*a;
        if n>=m then Break;
        n:=n-12*b;
        if a<=b then begin write(-1); halt end;
        Inc(day);
        t:=10;
      end;
    Write(day);
  end.

const fin='';
      fout='';
var a,b,s,t:longint;
    f,g:text;
procedure solve;
var i,swt,d:longint;
begin
    d:=1;
    while s<t do
    begin
        s:=s+(a-b)*12;
        if s>=t then write(g,d);
        inc(d);
    end;
end;
begin
    assign(f,fin);reset(f);
    assign(g,fout);rewrite(g);
    readln(f,s,t);readln(f,a,b);
    s:=s+a*8;
    if s>=t then write(g,0)
    else if a>b then solve
         else write(g,-1);
    close(f);close(g);
end.

program z1;
var a,b,c,d,i,j,k,l,m,n,h1,h2,v,t,h3,vd:longint;
begin
//assign(input,'d:\input.txt'); reset(input);
//assign(output,'d:\output.txt'); rewrite(output);
readln(h1,h2);
readln(a,b);
v:=a-b; vd:=v*12;
if h1+(a*8)>=h2 then begin write(0); exit; end;
if v<=0 then begin write(-1);  exit; end;
h1:=h1+a*8;
for t:=1 to 1000000 do
 begin
 h1:=h1-b*12+a*12; if h1>=h2 then begin write(t); exit; end;
 end;
end.

Program _1;
Var
   h1,h2,n,d,k,p:longint;
Begin
   {assign(input,'input.txt');
   assign(output,'output.txt');
   reset(input);
   rewrite(output);}
   read(h1,h2);
   read(d,n);
   k:=h1+d*8;
   if k>=h2 then begin
                 write('0');
                 exit;
                 end
    else if d<=n then begin
                      write('-1');
                      exit;
                      end;
   p:=-1*n*12+d*12;
   h1:=k;
   k:=0;
   while h1<h2 do begin
                  h1:=h1+p;
                  inc(k);
                  end;
   write(k);
   {close(input);
   close(output);}
End.

var a, b, s, f, t:integer;
begin
readln(s, f);
readln(a, b);
if s + a * 8 >= f then begin write('0'); exit; end;
if b >= a then begin write('-1'); exit; end;
t:=14;
while s < f do
  if (t mod 24 >= 10) and (t mod 24 < 22) then
    begin
    t:=t + 1;
    s:=s + a;
    end
  else
    begin
    t:=t + 1;
    s:=s - b;
    end;
write(t div 24);
end.

Var a,b,c,h1,h2,s1,s2,ans:int64;
 begin
  read(h1,h2,s1,s2);
   h1:=h1+8*s1;
   if (h1>=h2) then begin
                     write(0);
                     halt;
                    end;
   if s2>=s1 then begin
                     write(-1);
                     halt;
                     end;
   a:=12*s1-12*s2;
   b:=h2-h1;
   if b mod a=0 then write(b div a)
   else write(b div a+1);

   end.

program fg;
var h1,h2,a,k,b:integer;
begin
read(h1); readln(h2);
read(a); readln(b);
if h1+a*8>=h2 then k:=0
else
    if (a<=b) then  k:=-1
          else begin
          h1:=h1+8*a;k:=0;
          while h1<h2 do begin
          k:=k+1;
          h1:=h1-12*b+12*a;
          end;
          end;
write(k);

end.

uses math;
var
 i,j,k,n,m,s:longint;
 h1,h2,a,b:longint;
dh:longint;
begin
 readln(h1,h2);
 readln(a,b);
 k:=0;
 dh:=h2-h1;
 if dh<=8*a then writeln(0)
 else begin
 dh:=dh-8*a+2*b;
 if (a>=b) then
 while (dh>0)and(k<100000) do begin
    dh:=dh+10*b-12*a;
    if (dh<=0) then begin
        writeln(k+1);
        dh:=-24*b;
    end;
    dh:=dh+2*b;
    k:=k+1;
 end;
 if dh>0 then writeln(-1);
 end;

end.

uses math;
var
 i,j,k,n,m,s:longint;
 h1,h2,a,b:longint;
dh:longint;
begin
 readln(h1,h2);
 readln(a,b);
 k:=0;
 dh:=h2-h1;
 if dh<=8*a then writeln(0)
 else begin
 dh:=dh-8*a+2*b;
 if (a>=b) then
 while (dh>0)and(k<100000) do begin
    dh:=dh+10*b-12*a;
    if (dh<=0) then begin
        writeln(k+1);
        dh:=-24*b;
    end;
    dh:=dh+2*b;
    k:=k+1;
 end;
 if dh>0 then writeln(-1);
 end;
 //
end.

const inf = 500000;
var i,j,k,n,m,s,ans,h1,h2,sth,a,b:longint;

procedure ex(k:longint);
begin
  write(k);
  halt;
end;

begin
   read(sth,h2,k,b);
   h1:=sth;
   k:=k*4;
   b:=b*12;

   if h1 >= h2 then ex(0);

   inc(h1,2*k);
   if h1 >= h2 then ex(0);
   dec(h1,b);

   while h1 < h2 do
   begin
      inc(h1,k);

      inc(ans);
      if (h1 <= sth) and (ans > 10) then ex(-1);

      if h1 >= h2 then break;
      inc(h1,k*2);
      if h1 >= h2 then break;

      dec(h1,b);
   end;

   writeln(ans);

end.

program fdf;
var h1,h2,a,b,n,k:longint;
begin
read(h1,h2);
read(a,b);
if (a<=b)then
   if (h1+a*8>=h2) then write('0')
   else write('-1')
else
    begin
    if (h2<=h1+a*8) then write('0')
    else
    begin
    n:=h2-h1-8*a;
    if (n<=0) then write ('1')
    else
        repeat
        n:=n-12*a+12*b;
        k:=1+k;
        until (n<=0);
    write(k);
    end;
    end;
end.

var h1,h2,a,b,k:integer;
begin
readln(h1,h2);
readln(a,b);
k:=0;
if (a>b) or (a*8+h1>=h2) then begin
h1:=a*8+h1;
while h1<h2 do begin
k:=k+1;
h1:=(a-b)*12+h1;
if h1<0 then h1:=0;
end;
writeln(k);
end
else writeln(-1);
end.

var h1, h2: longint;
    a, b: longint;
    x, y, z, g: longint;

begin
  readln(h1, h2);
  readln(a, b);

  if (a <= b)and(h2 - h1 > a * 8)
    then
      writeln(-1)
    else
      begin
        x := h1 + a * 8;
        a := a * 12;
        b := b * 12;
        if x >= h2
          then
            writeln(0)
          else
            if not(trunc((h2 - x) / (a - b)) < (h2 - x) / (a - b))
              then
                writeln((h2 - x) div (a - b))
              else
                writeln(((h2 - x) div (a - b)) + 1)
      end;
end.

program pr1;
var h1,h2,a,b,k,i:integer;
begin
read(h1,h2);
read(a,b);
i:=0;
k:=h2-h1-8*a;
if ((k>0) and (a<=b)) then
i:=-1
else
if (k>0) then
  while (k>0) do
    begin
    k:=k+12*b-12*a;
    i:=i+1;
    end;
write(i);
end.

var i, n, m, k, l, o, p, ans, h1, h2, a, b, ans1:LongInt;
 Begin
  Read(h1, h2);
  Read(a, b);

    Inc(h1, a*8);
    if (h1>= h2) then Begin WriteLn(0);Halt;End;
     if a<b then Begin WriteLn(-1);Halt;End;
    Dec(h1, b*2);
 while h1<h2 do
   Begin
     Dec(h1, b*10);
     Inc(h1, a*12);
     Inc(ans);
     if h1>=h2 then Begin WriteLn(ans);Halt;End;
     if (a=b) then Begin  WriteLn(-1);Halt;End;
     Dec(h1, b*2);

   End;

 End.

var
h1,h2,a,b:integer;
begin
readln(h1,h2);
readln(a,b);
if h1+8*a>=h2
then writeln(0)
else if a<=b
     then writeln(-1)
     else if ((h2-h1-8*a) mod (12*(a-b))=0)
          then writeln((h2-h1-8*a) div (12*(a-b)))
          else writeln((h2-h1-8*a) div (12*(a-b))+1);
end.

var h1,h2,a,b,k:integer;
begin
  read(h1,h2,a,b);
  k:=0;
  if (b >= a) and (h2 > h1 + 8*a) then write(-1) else begin
    while h1<h2 do begin
      h1:=h1+8*a;
      if h1 >= h2 then begin write(k); exit; end;
      h1:=h1 - 12* b + 4* a;
      inc(k);
    end;
    write(k);
  end;

end.

Var h,h1,a,b,k:longint;

 Begin
  read(h,h1);
  read(a,b);

  if h+a*8<h1
    then if a<=b
           then begin
                 write(-1);
                 halt
                end
           else begin
                 k:=0;

                 h:=h+a*8;

                 while h<h1 do
                  begin
                   dec(h, b*12);
                   inc(k);
                   inc(h, a*12);
                  end;

                 write(k);
                end
    else write(0);

 end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if (l=r) or ((8*a)+l>=r) then
begin
    writeln(0);
    exit;
end;
if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end;
i:=l;
res:=0;
inc(i,A*8);
while i<r do
begin
    inc(i,12*a);
    dec(i,12*b);
    if res>1000000 then
    begin
        writeln('-1');
        exit;
    end;
    inc(res);
end;
writeln(res);
end.

var
  a, b, c, d, e, f: int64;

begin
  readln(a, b);
  readln(c, d);
  f := 0;
  e := a + 8 * c;
  if (e < b) and (c <= d) then writeln(-1)
  else begin
    while e < b do
    begin
      dec(e, 12 * d);
      inc(e, 12 * c);
      inc(f);
    end;
    writeln(f);
  end;
end.

var h1,h2,a,b,cur:integer;
begin
  readln(h1,h2);
  readln(a,b);
  cur:=h1+8*a;
  if h2<=cur then
  begin
    writeln(0);
    exit;
  end;
  if (b>=a) then
  begin
    writeln(-1);
    exit;
  end
  else
  if ((h2-cur) mod (a*12-b*12))=0 then writeln ((h2-cur) div (a*12-b*12)) else
  writeln(((h2-cur) div (a*12-b*12)) +1);
end.

var h1,h2,a,b,k:integer;
begin
  read(h1,h2,a,b);
  h1:=h1+8*a;
  if h1>=h2 then write(0)
  else
  if a<=b then write(-1)
  else
  write((h2-h1+12*a-12*b-1)div(12*a-12*b))
end.

      {$APPTYPE CONSOLE}
const nn=3; besk=2000000000000000000;
   nnn=2000000;  eps=1e-11; modul=1000000007;
 type matr=array[1..3,1..3] of extended;
   mat=^matr;
 label 1,2,3,4;

var i2,j2,aa,bb,i1,j1,k,step,kt,ppp,god,day,mon,mask,i0,j0,i,j,start,finish:longint;
qq,newdl,dloch,kol,shag,m,t,ii,jj,l,r,p,p3,pos,ll,pp,tt,ot1,ot2,s,kold,n:int64;
def,xx,cc,q,t1,t2,p4,p1,p2,ot,dist1,vt,zap,ba,by,ay,kk,centr,koef:int64;
flag2,flag1,flag:boolean;
ch1,ch2,ch:char;
str:array[-10..12000] of matr;
prob,ccc1,v,rr,h1,h2,h,r1,r2,aaa,bbb,ccc,hh,po,pt,doltek,dolpred:extended;
b1,a1,next,prev,x1,x2,y1,y2,d,och,newoch,f,x,y,fact,c,b,a,prost:array[-200000..1100000] of int64;
oldzan,oldmarked,zan: array[0..330006] of boolean;
gr:array[-1..1001,-1..1001] of boolean;
agor,aver,ssumgor,ssumver,sgor,sver,udd,dostl,dostr: array[-100..600,-100..600] of int64;
det,ott :double;
d3,d1,d2,dist,edin:matr;
ss,ss1,ss2:string;
dd:array[-21..2001,-2001..2001] of int64;
marked,dost,newdost:array[-10..700000] of boolean;
ssnew:array[-10..1000000] of char;
pole:array[-10..610,-10..600] of char;
name:array[0..2000] of string;
function min (a,b:int64):int64;begin min:=b;if a<b then min:=a;  end;
function max (a,b:int64):int64;begin max:=b;if a>b then max:=a;  end;

 function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

function degg(p,deg:int64):int64; var pp,q:int64;
 begin if deg=0 then degg:=1 else begin   if odd(deg) then degg:=(degg(p,deg-1)*p) mod modul else
 begin q:=(degg(p,deg shr 1)) mod modul; degg:=(q*q) mod modul;   end; end;   end;

begin
 { assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
  }
read(h1,h2);
read(t1,t2);
  for i:=0 to 1000000 do
    begin
       if i>0 then h1:=h1+12*t1 else h1:=h1+8*t1;
       if h1>=h2 then begin write(i); goto 1;   end;
       h1:=h1-12*t2;
    end;
      writeln(-1);

   1:          close(output);
end.

program z1;
var k,h1,h2,a,b:longint;
begin
readln(h1,h2,a,b);
if ((h1+a*8)<h2) and (a<=b) then k:=-1 else
if h1+a*8>=h2 then k:=0 else
begin
h1:=h1+a*8;
while h1<h2 do begin
h1:=h1+a*12-b*12;
k:=k+1; end;

end;
writeln(k); end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type arr=array[1..1000000] of longint;
arr1=array[1..100,1..100] of longint;
var mas:arr;
s:string;
c:char;
i,j,m,n,k,x,d,q,res,h1,h2:longint;
begin
 read(h1,h2);
 read(d,n);
 k:=0;
 if (n>=d) and ((h1+d*8)<h2) then
 begin
  writeln(-1);
  halt;
 end;
 if h1+d*8>=h2 then writeln(0) else
 begin
  h1:=h1+d*8;
  while h1<h2 do
  begin
   h1:=h1+d*12-n*12;
   inc(k);
  end;
   writeln(k);
 end;
end.

var
  h1, h2, a, b, k, hour, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a <=b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;
  hev := 8 * a + h1;
  hour := a-b;
  for k := 1 to 10000001 do
    if hev + 24*k*hour >= h2 then begin
      write(k);
      Halt;
    end;
end.

var
  h1, h2, a, b, k, day, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a < b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;
  hev := 8 * a + h1;
  day := 12 * a - 12 * b;
  for k := 1 to 100001 do
    if hev + k * day  >= h2 then begin
      write(k);
      Halt;
    end;
end.

var
  h1, h2, a, b, k, hour, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a <=b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;
  hev := 8 * a + h1;
  hour := a-b;
  for k := 1 to 10000001 do
    if hev + 12*k*hour >= h2 then begin
      write(k);
      Halt;
    end;
end.

var
  h1, h2, a, b, k, day, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a <=b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;
  hev := 8 * a + h1;
  day := 12 * a - 12 * b;
  for k := 1 to 10000001 do
    if hev + k * day  >= h2 then begin
      write(k);
      Halt;
    end;
end.

var
  h1, h2, a, b, k, hour, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a <=b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;
  hev := 8 * a + h1;
  hour := a-b;
  for k := 1 to 10000001 do
    if hev + 24*(k-1)*hour+8*a-12*b  >= h2 then begin
      write(k);
      Halt;
    end;
end.

var h1,h2,a,b,k,day,hev:integer;
begin
read(h1,h2);
readln;
read(a,b);
if (a<b) and (a+h1<h2) then begin
write('-1');
Halt;
end;
if (8*a+h1>=h2) and (a<=b) then begin
write('0');
Halt;
end;
hev:=8*a+h1;
day:=12*a-12*b;
for k:=1 to 100001 do if hev+k*day>=h2 then begin
write(k);
Halt;
end;
end.

var
  h1, h2, a, b, k, hour, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a <=b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;
  hev := 8 * a + h1;
  hour := a-b;
  for k := 1 to 10000001 do
    if hev + 24*(k-1)*hour+9*a-12*b  >= h2 then begin
      write(k);
      Halt;
    end;
end.

var
  h1, h2, a, b, k, hour, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a <=b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;
  hev := 8 * a + h1;
  hour := a-b;
  for k := 1 to 10000001 do
    if hev + 24*(k-1)*hour+9*a  >= h2 then begin
      write(k);
      Halt;
    end;
end.

var
  h1, h2, a, b, k, hour, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a <=b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;
  hev := 8 * a + h1;
  hour := a-b;
  for k := 1 to 10000001 do
    if hev + 24*(k-1)*hour+8*a  >= h2 then begin
      write(k);
      Halt;
    end;
end.

var h1,h2,a,b,k,day,hev:integer;
begin
read(h1,h2);
readln;
read(a,b);
if (a<b) and (8*a+h1<h2) then begin
write('-1');
Halt;
end;
if (8*a+h1>=h2) and (a<=b) then begin
write('0');
Halt;
end;
hev:=8*a+h1;
day:=12*a-12*b;
for k:=1 to 100001 do if hev+k*day-day+8*a>=h2 then begin
write(k);
Halt;
end;
end.

var
  h1, h2, a, b, k, day, hev: integer;

begin
  read(h1, h2);
  readln;
  read(a, b);
  if (a < b) and (8 * a + h1 < h2) then begin
    write('-1');
    Halt;
  end;
  if (8 * a + h1 >= h2) and (a <= b) then begin
    write('0');
    Halt;
  end;
  hev := 8 * a + h1;
  day := 12 * a - 12 * b;
  for k := 1 to 100001 do
    if hev + k * day - day  >= h2 then begin
      write(k);
      Halt;
    end;
end.

var h1,h2,a,b,k,day,hev:integer;
begin
read(h1,h2);
readln;
read(a,b);
if (a<b) and (8*a+h1<h2) then begin
write('-1');
Halt;
end;
if (8*a+h1>=h2) and (a<=b) then begin
write('0');
Halt;
end;
hev:=8*a+h1;
day:=12*a-12*b;
for k:=1 to 100001 do if hev+k*day>=h2 then begin
write(k);
Halt;
end;
end.

Const Finp='';
      Fout='';
Var h1,h2,a,b:longint;

Procedure Nhap;
Var f:Text;
Begin
    assign(f,finp); reset(f);
    readln(f,h1,h2);
    read(f,a,b);
    close(f);
End;
Function Solve:longint;
Var res,temp:longint;
Begin
    if h1>h2 then
        h2:=h1-h2
    else
        h2:=h2-h1;
    if a<b then
        exit(-1);
    if a=b then
        begin
            if h2<=12 then
                exit(0);
            exit(-1);
        end;
    if a<b then
        begin
            temp:=a;
            a:=b;
            b:=temp;
        end;
    a:=a*12; b:=b*12;
    res:=(h2-a) div (a-b);
    if (h2-a) mod (a-b)<>0 then
        inc(res);
    solve:=res;
End;
Procedure Xuat;
Var f:Text;
Begin
    assign(f,fout); rewrite(f);
    write(f,solve);
    close(f);
End;

Begin
    nhap;
    xuat;
End.

Const Finp='';
      Fout='';
Var h1,h2,a,b:longint;

Procedure Nhap;
Var f:Text;
Begin
    assign(f,finp); reset(f);
    readln(f,h1,h2);
    read(f,a,b);
    close(f);
End;
Function Solve:longint;
Var res,temp:longint;
Begin
    if h1+8*a>=h2 then
        exit(0);
    if (h1+8*a<h2) and (a<=b) then
        exit(-1);
    if h1>h2 then
        h2:=h1-h2
    else
        h2:=h2-h1;
    if a<b then
        begin
            temp:=a;
            a:=b;
            b:=temp;
        end;
    a:=a*12; b:=b*12;
    res:=(h2-a) div (a-b);
    if (h2-a) mod (a-b)<>0 then
        inc(res);
    solve:=res;
End;
Procedure Xuat;
Var f:Text;
Begin
    assign(f,fout); rewrite(f);
    write(f,solve);
    close(f);
End;

Begin
    nhap;
    xuat;
End.

Const Finp='';
      Fout='';
Var h1,h2,a,b:longint;

Procedure Nhap;
Var f:Text;
Begin
    assign(f,finp); reset(f);
    readln(f,h1,h2);
    read(f,a,b);
    close(f);
End;
Function Solve:longint;
Var res,temp:longint;
Begin
    if h1>h2 then
        h2:=h1-h2
    else
        h2:=h2-h1;
    if a<=b then
        begin
            if h2<=12 then
                exit(0);
            exit(-1);
        end;
    if a<b then
        begin
            temp:=a;
            a:=b;
            b:=temp;
        end;
    a:=a*12; b:=b*12;
    res:=(h2-a) div (a-b);
    if (h2-a) mod (a-b)<>0 then
        inc(res);
    solve:=res;
End;
Procedure Xuat;
Var f:Text;
Begin
    assign(f,fout); rewrite(f);
    write(f,solve);
    close(f);
End;

Begin
    nhap;
    xuat;
End.

Const Finp='';
      Fout='';
Var h1,h2,a,b:longint;

Procedure Nhap;
Var f:Text;
Begin
    assign(f,finp); reset(f);
    readln(f,h1,h2);
    read(f,a,b);
    close(f);
End;
Function Solve:longint;
Var res,temp:longint;
Begin
    if h1+8*a>=h2 then
        exit(0);
    if (h1+8*a<h2) and (a<=b) then
        exit(-1);
    res:=(h2-h1-8*a) div 12*(a-b);
    if (h2-h1-8*a) mod 12*(a-b)<>0 then
        res:=res+1;
    solve:=res;
End;
Procedure Xuat;
Var f:Text;
Begin
    assign(f,fout); rewrite(f);
    write(f,solve);
    close(f);
End;

Begin
    nhap;
    xuat;
End.

var  h1,h2,a,b,ans:longint;
begin
    readln(h1,h2);
    readln(a,b);
    inc(h1,8*a);
    if h1>=h2 then begin
        writeln(0);
        halt;
    end;
    if (h1<h2)and(a<=b)then begin
        writeln(-1);
        halt;
    end;
    repeat
        dec(h1,12*b) ;
        inc(ans);
        if h1<0 then h1:=0;
        inc(h1,12*a);
        if h1>=h2 then begin
            writeln(ans);
            halt;
        end;
    until false;
end.

var  h1,h2,a,b,ans:longint;
begin
    readln(h1,h2);
    readln(a,b);
    inc(h1,8*a);
    if h1>=h2 then begin
        writeln(0);
        halt;
    end;
    if (h1<h2)and(a<=b)then begin
        writeln(-1);
        halt;
    end;
    repeat
        dec(h1,12*b) ;
        if h1<0 then h1:=0;
        inc(h1,4*a);
        if h1>=h2 then begin
            writeln(ans);
            halt;
        end;
         inc(ans);
         inc(h1,8*a);
         if h1>=h2 then begin
             writeln(ans);
             halt;
         end;
    until false;
end.

var  h1,h2,a,b,ans:longint;
begin
    readln(h1,h2);
    readln(a,b);
    inc(h1,8*a);
    if h1>h2 then begin
        writeln(0);
        halt;
    end;
    if (h1<h2)and(a<=b)then begin
        writeln(-1);
        halt;
    end;
    repeat
        dec(h1,12*b) ;
        inc(ans);
        if h1<0 then h1:=0;
        inc(h1,12*a);
        if h1>h2 then begin
            writeln(ans);
            halt;
        end;
    until false;
end.

Var a,b,n,m,x,o,l,t,day,pr:LongInt;
  Begin
    Read(n,m,a,b);
    t:=14;
    While n<m do
      Begin
        x:=22-t;
        n:=n+x*a;
        if n>=m then Break;
        n:=n-12*b;
        if a<=b then begin write(-1); halt end;
        Inc(day);
        if n<0 then n:=0;
        t:=10;
      end;
    Write(day);

  end.

const fin='';
      fout='';
var a,b,s,t:longint;
    f,g:text;
procedure solve;
var i,swt,d:longint;
begin
    d:=1;
    while s<t do
    begin
        s:=s+(a-b)*12;
        if s>t then write(g,d);
        inc(d);
    end;
end;
begin
    assign(f,fin);reset(f);
    assign(g,fout);rewrite(g);
    readln(f,s,t);readln(f,a,b);
    s:=s+a*8;
    if s>=t then write(g,0)
    else if a>b then solve
         else write(g,-1);
    close(f);close(g);
end.

Var a,b,c,h1,h2,s1,s2,ans:int64;
 begin
  read(h1,h2,s1,s2);
   h1:=h1+8*s1;
   if (h1>=h2) then begin
                     write(0);
                     halt;
                    end;
   if s2>s1 then begin
                     write(-1);
                     halt;
                     end;
   ans:=1;
   a:=12*s1-12*s2;
   b:=h2-h1;
   if a>0 then ans:=ans+b div a
   else ans:=ans+b;
   write(ans);
 end.

Var a,b,c,h1,h2,s1,s2,ans:int64;
 begin
  read(h1,h2,s1,s2);
   h1:=h1+8*s1;
   if (h1>=h2) then begin
                     write(0);
                     halt;
                    end;
   if s2>s1 then begin
                     write(-1);
                     halt;
                     end;
   ans:=1;
   a:=12*s1-12*s2;
   b:=h2-h1;
   if a>0 then ans:=ans+b
   else ans:=-1;
   write(ans);
 end.

Var a,b,c,h1,h2,s1,s2,ans:int64;
 begin
  read(h1,h2,s1,s2);
   h1:=h1+8*s1;
   if (h1>=h2) then begin
                     write(0);
                     halt;
                    end;
   if s2>=s1 then begin
                     write(-1);
                     halt;
                     end;
   ans:=1;
   a:=12*s1-12*s2;
   b:=h2-h1;
    ans:=ans+b div a;
   write(ans);
 end.

Var a,b,c,h1,h2,s1,s2,ans:int64;
 begin
  read(h1,h2,s1,s2);
   h1:=h1+8*s1;
   if (h1>=h2) then begin
                     write(0);
                     halt;
                    end;
   if s2>s1 then begin
                     write(-1);
                     halt;
                     end;
   ans:=1;
   a:=12*s1-12*s2;
   b:=h2-h1;
   if a>0 then ans:=ans+b div a;
   write(ans);
 end.

Var a,b,c,h1,h2,s1,s2,ans:int64;
 begin
  read(h1,h2,s1,s2);
   h1:=h1+8*s1;
   if (h1>=h2) then begin
                     write(0);
                     halt;
                    end;
   if s2>s1 then begin
                     write(-1);
                     halt;
                     end;
   ans:=1;
   a:=12*s1-12*s2;
   b:=h2-h1;
   if a>0 then ans:=ans+b div a
   else ans:=-1;
   write(ans);
 end.

program fg;
var h1,h2,a,k,b:integer;
begin
read(h1); readln(h2);
read(a); readln(b);
if h1+a*8>=h2 then k:=0
else
    if (a<=b) then  k:=-1
          else begin
          h1:=h1+8*a;k:=0;
          while h1<=h2 do begin
          k:=k+1;
          h1:=h1-12*b+12*a;
          end;
          end;
write(k);

end.

uses math;
var
 i,j,k,n,m,s:longint;
 h1,h2,a,b:longint;
dh:longint;
begin
 readln(h1,h2);
 readln(a,b);
 k:=0;
 dh:=h2-h1;
 if dh<=8*a then writeln(0)
 else
 if (a>b) then begin
 while dh>0 do begin
    dh:=dh-12*a;
    if (dh<=0) then begin
        writeln(k+1);
        dh:=-24*b;
    end;
    dh:=dh+12*b;
    k:=k+1;
 end;
 end
 //writeln(k);
 else writeln(-1);
end.

uses math;
var
 i,j,k,n,m,s:longint;
 h1,h2,a,b:longint;
dh:longint;
begin
 readln(h1,h2);
 readln(a,b);
 k:=0;
 dh:=h2-h1;
 if dh<=8*a then writeln(0)
 else begin
 dh:=dh-8*a+2*b;
 while (dh>0)and(k<100000) do begin
    dh:=dh+10*b-12*a;
    if (dh<=0) then begin
        writeln(k+1);
        dh:=-24*b;
    end;
    dh:=dh+2*b;
    k:=k+1;
 end;
 if dh>0 then writeln(-1);
 end;

end.

program fdf;
var h1,h2,a,b,n,k:longint;
begin
read(h1,h2);
read(a,b);
if (a<=b)then
   if (h1+a*8>=h2) then write('0')
   else write('-1')
else
    begin
    if (h2<=h1+a*8) then write('0')
    else
    begin
    n:=h2-h1-8*a;
    k:=1;
    if (n<=0) then write ('1')
    else
        repeat
        n:=n-12*a+12*b;
        k:=1+k;
        until (n<=0);
    write(k);
    end;
    end;
end.

program fdf;
var h1,h2,a,b,n,k:longint;
begin
read(h1,h2);
read(a,b);
if (a<=b)then
   if (h1+a*8>=h2) then write('0')
   else write('-1')
else
    begin
    h1:=h1-4*a;
    n:=h2-h1-12*a;
    if (n<=0) then write ('1')
    else
        repeat
        n:=n-12*a+12*b;
        k:=1+k;
        until (n<=0);
    write(k);
    end;
end.

var h1,h2,a,b,k:integer;
begin
readln(h1,h2);
readln(a,b);
k:=0;
if (a>b) or (a*8+h1>h2) then begin
h1:=a*8+h1;
while h1<h2 do begin
k:=k+1;
h1:=(a-b)*12+h1;
if h1<0 then h1:=0;
end;
writeln(k);
end
else writeln(-1);
end.

program pr1;
var h1,h2,a,b,k,i:integer;
begin
read(h1,h2);
read(a,b);
i:=0;
k:=h2-h1-8*a;
if ((k>0) and (a>b)) then
  while (k>0) do
    begin
    k:=k+12*b-12*a;
    i:=i+1;
    end
  else
  i:=-1;
write(i);
end.

var i, n, m, k, l, o, p, ans, h1, h2, a, b:LongInt;
 Begin
  Read(h1, h2);
  Read(a, b);
  if a<b then Begin WriteLn(-1);Halt;End;
  Inc(h1, a*8);

 while h1<h2 do
   Begin
     Dec(h1, b*12);
     Inc(h1, a*12);
     Inc(ans);

   End;
   WriteLn(ans);
 End.

var i, n, m, k, l, o, p, ans, h1, h2, a, b, ans1:LongInt;
 Begin
  Read(h1, h2);
  Read(a, b);

    Inc(h1, a*8);
    if (h1>= h2) or ((h1<h2) and (a=b)) then Begin WriteLn(0);Halt;End;
     if a<b then Begin WriteLn(-1);Halt;End;
    Dec(h1, b*2);
 while h1<h2 do
   Begin
     Dec(h1, b*10);
     Inc(h1, a*12);
     Inc(ans);
     if h1>=h2 then Begin WriteLn(ans);Halt;End;
     Dec(h1, b*2);

   End;

 End.

var i, n, m, k, l, o, p, ans, h1, h2, a, b, ans1:LongInt;
 Begin
  Read(h1, h2);
  Read(a, b);
  if a<b then Begin WriteLn(-1);Halt;End;
    Inc(h1, a*8);
    if h1>= h2 then Begin WriteLn(0);Halt;End;
    Dec(h1, b*2);
 while h1<h2 do
   Begin
     Dec(h1, b*10);
     Inc(h1, a*12);
     Inc(ans);
     if h1>=h2 then Begin WriteLn(ans);Halt;End;
     Dec(h1, b*2);

   End;

 End.

var
h1,h2,a,b:integer;
begin
readln(h1,h2);
readln(a,b);
if h1+8*a>=h2
then writeln(0)
else if a<=b
     then writeln(-1)
     else if ((h2-h1-8*a) div (12*(a-b))=0) and  ((h2-h1-8*a) mod (12*(a-b))=0)
          then writeln((h2-h1-8*a) div (12*(a-b)))
          else writeln((h2-h1-8*a) div (12*(a-b))+1);
end.

var h1,h2,a,b,k:integer;
begin
  read(h1,h2,a,b);
  k:=0;
  if (b >= a) and (h2 > h1 + 8*a) then write(-1) else begin
    while h1<h2 do begin
      h1:=h1+8*a;
      if h1 > h2 then begin write(k); exit; end;
      h1:=h1 - 12* b + 4* a;
      inc(k);
    end;

  end;

end.

var h1,h2,a,b,k:integer;
begin
  read(h1,h2,a,b);
  k:=0;
  if (b >= a) and (h2 >= h1 + 8*a) then write(-1) else begin
    while h1<h2 do begin
      h1:=h1+8*a;
      if h1 > h2 then begin write(k); exit; end;
      h1:=h1 - 12* b + 4* a;
      inc(k);
    end;
    write(k);
  end;

end.

var h1,h2,a,b,k:integer;
begin
  read(h1,h2,a,b);
  k:=0;
  if (b >= a) and (h2 > h1 + 8*a) then write(-1) else begin
    while h1<h2 do begin
      h1:=h1+8*a;
      if h1 >= h2 then begin write(k); exit; end;
      h1:=h1 - 12* b + 4* a;
      inc(k);
    end;

  end;

end.

var h1,h2,a,b,k:integer;
begin
  read(h1,h2,a,b);
  k:=0;
  if (b >= a) and (h2 >= h1 + 8*a) then write(-1) else begin
    while h1<h2 do begin
      h1:=h1+8*a;
      if h1 > h2 then begin write(k); exit; end;
      h1:=h1 - 12* b + 4* a;
      inc(k);
    end;

  end;

end.

var h1,h2,a,b,k:integer;
begin
  read(h1,h2,a,b);
  k:=0;
  if (b>=a) and (h2 >= h1 + 8*a) then write(-1) else begin
    while h1<h2 do begin
      h1:=h1+8*a;
      if h1>=h2 then begin write(k); exit; end;
      h1:=h1 - 12* b + 4* a;
      inc(k);
    end;

  end;

end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end;
i:=l;
res:=0;
inc(i,A*8);
while i<r do
begin
    inc(i,12*a);
    dec(i,12*b);
    if res>1000000 then
    begin
        writeln('-1');
        exit;
    end;
    inc(res);
end;
writeln(res);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end;
i:=l;
res:=0;
j:=15;
while i<>r do
begin
    if res>=1 then j:=10;

    while (i<>r) and (j<=22) do
    begin
    inc(i,a);
    inc(j);

    end;

    j:=-2;
    while (i<>r) and (j<10) do
    begin
    dec(i,b);
    inc(j);

    end;
    inc(res);
    if res>99999999 then
    begin
        writeln('-1');
        exit;
    end;

end;
writeln(res-1);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
{if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end; }
i:=l;
res:=0;
j:=15;
while i<>r do
begin
    if res>=1 then j:=10;

    while (i<>r) and (j<=22) do
    begin
    inc(i,a);
    inc(j);

    end;

    j:=-1;
    while (i<>r) and (j<=10) do
    begin
    dec(i,b);
    inc(j);

    end;
    inc(res);
    if res>6999999 then
    begin
        writeln('-1');
        exit;
    end;

end;
writeln(res-1);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
{if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end; }
i:=l;
res:=0;
j:=15;
while i<>r do
begin
    if res>=1 then j:=10;

    while (i<>r) and (j<=22) do
    begin
    inc(i,a);
    inc(j);

    end;

    j:=-3;
    while (i<>r) and (j<=10) do
    begin
    dec(i,b);
    inc(j);

    end;
    inc(res);
    if res>1000000 then
    begin
        writeln('-1');
        exit;
    end;

end;
writeln(res-1);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
{if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end; }
i:=l;
res:=0;
inc(i,A*8);
while i<r do
begin
    inc(i,12*a);
    dec(i,12*b);
    if res>1000000 then
    begin
        writeln('-1');
        exit;
    end;
    inc(res);
end;
writeln(res);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end;
i:=l;
j:=14;
while i<>r do
begin
    if res>1 then j:=10;

    while (i<>r) and (j<=22) do
    begin
    inc(i,a);
    inc(j);
    end;

    j:=-2;
    while (i<>r) and (j<=10) do
    begin
    dec(i,b);
    inc(j);
    end;
    inc(res);

end;
writeln(res-1);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end;
i:=l;
j:=14;
while i<>r do
begin
    if res>1 then j:=10;

    while (i<>r) and (j<=22) do
    begin
    inc(i,a);
    inc(j);
    end;

    j:=-2;
    while (i<>r) and (j<=10) do
    begin
    dec(i,b);
    inc(j);
    end;
    inc(res);

end;
writeln(res-1);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end;
i:=l;
res:=0;
j:=15;
while i<>r do
begin
    if res>=1 then j:=10;

    while (i<>r) and (j<=22) do
    begin
    inc(i,a);
    inc(j);

    end;

    j:=-2;
    while (i<>r) and (j<=10) do
    begin
    dec(i,b);
    inc(j);

    end;
    inc(res);
    if res>999999 then
    begin
        writeln('-1');
        exit;
    end;

end;
writeln(res-1);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
{if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end; }
i:=l;
res:=0;
j:=14;
while i<>r do
begin
    if res>=1 then j:=10;

    while (i<>r) and (j<=22) do
    begin
    inc(i,a);
    inc(j);

    end;

    j:=-3;
    while (i<>r) and (j<=10) do
    begin
    dec(i,b);
    inc(j);

    end;
    inc(res);
    if res>1000000 then
    begin
        writeln('-1');
        exit;
    end;

end;
writeln(res-1);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
{if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end; }
i:=l;
res:=0;
j:=15;
while i<>r do
begin
    if res>=1 then j:=10;

    while (i<>r) and (j<=22) do
    begin
    inc(i,a);
    inc(j);

    end;

    j:=-2;
    while (i<>r) and (j<=10) do
    begin
    dec(i,b);
    inc(j);

    end;
    inc(res);
    if res>1000000 then
    begin
        writeln('-1');
        exit;
    end;

end;
writeln(res-1);
end.

var i,n,l,r,a,b,res,j:longint;
ch:boolean;
begin
read(L,R);
read(a,b);
if l=r then
begin
    writeln(0);
    exit;
end;
{if ((a>b) and (l>r)) or ((a<b) and (l<r)) then
begin
    writeln('-1');
    exit;
end; }
i:=l;
res:=0;
j:=15;
while i<>r do
begin
    if res>=1 then j:=10;

    while (i<>r) and (j<=22) do
    begin
    inc(i,a);
    inc(j);

    end;

    j:=-1;
    while (i<>r) and (j<=10) do
    begin
    dec(i,b);
    inc(j);

    end;
    inc(res);
    if res>1000000 then
    begin
        writeln('-1');
        exit;
    end;

end;
writeln(res-1);
end.

var h1,h2,a,b,k:integer;
begin
  read(h1,h2,a,b);
  h1:=h1+8*a;
  if h1>=h2 then write(0)
  else
  if a<=b then write(-1)
  else
  write((h2-h1)div(12*a-12*b)+1)
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type arr=array[1..1000000] of longint;
arr1=array[1..100,1..100] of longint;
var mas:arr;
s:string;
c:char;
i,j,m,n,k,x,d,q,res,h1,h2:longint;
begin
 read(h1,h2);
 read(d,n);
 if n>d then
 begin
  writeln(-1);
  halt;
 end;
 res:=0;
 h1:=h1+d*8;
 if h1<h2 then
 begin
 h1:=h1-n*12;
 while h2>h1 do
 begin
  inc(res);
  h1:=h1+d*12;
  if h1>h2 then break;
  h1:=h1-n*12;
 end;
 end;
 writeln(res);
 readln;
 readln;
 readln;
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type arr=array[1..1000000] of longint;
arr1=array[1..100,1..100] of longint;
var mas:arr;
s:string;
c:char;
i,j,m,n,k,x,d,q,res,h1,h2:longint;
begin
 read(h1,h2);
 read(d,n);
 k:=0;
 if (n>=d) and ((h1+d*8)<h2) then
 begin
  writeln(-1);
  halt;
 end;
 if h1+d*8>=h2 then writeln(0) else
 begin
  h1:=h1+d*8;
  while h1<h2 do
  begin
   h1:=h1+d*12-n*12;
   inc(k);
  end;
 end;
 writeln(k);
end.


Imp likes his plush toy a lot.  Recently, he found a machine that can clone plush toys. Imp knows that if he applies the machine to an original toy, he additionally gets one more original toy and one copy, and if he applies the machine to a copied toy, he gets two additional copies.Initially, Imp has only one original toy. He wants to know if it is possible to use machine to get exactly x copied toys and y original toys? He can't throw toys away, and he can't apply the machine to a copy if he doesn't currently have any copies.

The only line contains two integers x and y (0 ≤ x, y ≤ 109) — the number of copies and the number of original toys Imp wants to get (including the initial one).

Print "Yes", if the desired configuration is possible, and "No" otherwise. You can print each letter in arbitrary case (upper or lower).

NoteIn the first example, Imp has to apply the machine twice to original toys and then twice to copies.

var
  x, y : integer;
begin
  read(x, y);
  if y = 0 then
    write('NO')
  else
    if (y = 1) and (x<>0) then
      write('NO')
    else
      begin
        x := x - y + 1;
        if x < 0 then
          write('NO');
        if x >= 0 then
          if x mod 2 = 0 then
            write('YES')
          else
            write('NO');
      end;
end.

var a,b:int64;
begin
read(b,a);
if a-1 = b then write('YES') else
if a-1>b then write('NO')  else
if ((b-a+1)mod 2=0)and(a>1) then write('YES') else
write('NO');

end.

var x,y: longint;
begin
readln (x,y);
if y=0 then writeln ('NO');
if y=1 then
    begin
    if x=0 then writeln ('YES')
    else writeln ('NO');
    end;
if y>=2 then
    begin
    if (x>=y-1) and ((x+1-y) mod 2 = 0) then writeln ('YES')
    else writeln ('NO');
    end;
end.

Var ik,io:integer;
Begin
Read(ik,io);
If (ik>io-2) and (io>0) and ((io>1)or(ik<1)) then begin
  If (ik-io+1) mod 2 = 0 then write('Yes') else write('No');
end else write('No');
End.

var x,y:int64;
begin
read(y,x);
if (x=1) and (y<>0) then begin  write('No'); exit end;
if (x=0) then begin  write('No'); exit end;
if (y>=x-1) and (y mod 2 = (x-1) mod 2) then write('Yes') else write('No')
end.

program CloningToys;
var x,y: longint;
BEGIN
readln(x,y);
if (y=0) then begin
 writeln('no');
 exit;
end;
if (y>1) and (x<y-1) then begin
 writeln('no');
 exit;
end;
if (y=1) and (x<>0) then begin
 writeln('no');
 exit;
end;
x:=x-y+1;
if (odd(x)) then writeln('no') else writeln('yes');
END.

var
 x,y : longint;
begin
 readln(x,y);
 if (y=0) then begin writeln('No'); halt; end;
 if (y=1) then
  begin
   if x=0 then writeln('Yes') else writeln('No');
   halt;
  end;
 if x>=y-1 then
  begin
   if (x-(y-1)) mod 2=0 then writeln('Yes') else writeln('No');
  end else writeln('No');
end.

var
  x, y: LongInt;
  ans: string;

begin
  ReadLn(x, y);
  ans := 'No';
  If y-x=1 then ans := 'Yes';
  If (x-y) mod 2 = 1 then ans := 'Yes';
  If y = 0 then ans := 'No';
  If (y = 1) and (x > 0) then ans := 'No';
  WriteLn(ans);
end.

var
  a,b:longint;
 begin
  read(b,a);
  if a=0 then write('NO')else
   if(a=1)and(b<>0)then write('NO')else begin
    b:=b-a+1;
    if b<0 then write('NO');
    if b>=0 then if b mod 2=0 then write('YES')
            else write('NO');
  end;
 end.

program zzz;
var
  t:boolean;
  x,y:longint;
begin
  readln(x,y);
  t:=false;
  if ((x-y+1)mod 2 =0)and (y>0)and(x>=y-1) then t:=true;
  if (t) and (y>1) or(x=0)and(y=1) then writeln('yes')
                                   else writeln('no');
end.

program z1;
var x,y,nac,nac1:longint;
begin
read(x,y);
nac:=y;
if y=0 then begin write('NO');exit;end;
nac1:=y-1;
   while (nac1<x)and(nac1<>0) do inc(nac1,2);
if nac1=x then write('YES')
else write('NO');
end.

var
  x,y,ro,kl : longint;
begin
  readln(x,y);
  if (y-1>x) or ((y=1) and (x>0)) or (y=0) then begin writeln('No'); halt; end;
  kl:=y-1;
  ro:=y;
  if (x-kl) mod 2=0 then writeln('Yes') else writeln('No');
end.

var a,b,x,y:longint;
begin
 read(x,y);
 if (y=1)and(x=0) then begin write('Yes');halt;end;
 if y<2 then begin write('No');halt;end;
 a:=y-1;
 b:=x-a ;
 if odd(b) or(b<0) then write('No')else
 write('Yes');
end.

program cloning;
uses wincrt;
var x,y,x1,y1,z : longint;
begin
readln(x,y);
x1 := 0;
y1 := 1;

y1:= 1+ abs(y-1);
x1:= abs(y-1);
if(x1 >= 1)then
begin
   x1 := x1 + abs(x - x1) div 2 * 2;
end;
if((x = x1) and (y = y1))then
begin
   writeln('Yes');
end
else
begin
   writeln('No');
end;
end.

program hrn;
 var
  a,b:longint;
 begin
  read(b,a);
  if a=0 then write('NO')else
   if(a=1)and(b<>0)then write('NO')else begin
    b:=b-a+1;
    if b<0 then write('NO');
    if b>=0 then if b mod 2=0 then write('YES')
            else write('NO');
  end;
 end.

var x,y:longint;
begin
        readln(x,y);
         if y=0 then
                begin
                write('NO');
                  halt;
                end;
           if (y=1)  then
                    if x=0 then
                                begin
                                write('YES');
                                halt;
                                end
                        else
                                begin
                                write('NO');
                                halt;
                                end;

          if (x>=(y-1)) and ((x-y+1) mod 2=0)  then write('YES')
           else
             write('NO');

end.

var
  cop, n_orig, n_cop : longint;
begin
  cop := 0;
  readln(n_cop, n_orig);
  cop := n_orig - 1;
  if (n_cop = 0) and (n_orig = 1)
    then
      begin
        writeln('Yes');
        halt;
      end;
  if (cop > 0) and (n_cop >= cop) and((n_cop - cop) mod 2 = 0)
    then writeln('Yes')
    else writeln('No');

end.

var
q,x,y:longint;
begin
read(x,y);
q:=x-y+1;
if (x>0) and (y=0) then
begin write('No');
halt; end;
if (y=1) and (x>1) then
begin write('No');
halt; end;
if (q mod 2=0) and (q>=0)
then
write('Yes')
else write('No');
end.

var x,y,m,n:longint;
begin
readln(x,y);
m:=1;
n:=0;
if y>0 then
while m<>y do begin
              inc(m);
              inc(n);
              end;
if m=y then if (n<x) and (n>0) then while n<x do n:=n+2;
if (m=y) and (n=x) then writeln('YES')
                   else writeln('NO');
end.

program z1;
 var x, y, z :longint;
begin
 readln( x, y );
 if ((x = 0 ) and (y <> 1 )) or (y=0) or (x=y)
 then write ('No')
 else if ((x+1 = y) and (y<>1)) or ((x=0) and (y = 1))
 then write ('Yes')
 else begin
 z := x - ( y - 1 );
 if (z mod 2 = 0) and (y <> 1) and(y < x )
    then write( 'Yes' )
    else if (y =1 ) and ((x-1) mod 2 =0 )
    then write ('Yes')
    else write('No')
end;
end.

var x,y,ans:longint;
begin
 {assign(input,'input.txt');
 reset(input);}
 read(x); read(y);
 {close(input);
 assign(output,'output.txt');
 rewrite(output); }
 ans:=x-(y-1);
 if (ans>=0) and (ans mod 2 = 0) and not ((y=1) and (x>0)) and (y<>0) then write('Yes')
 else write('No');
 //close(output);
end.

var c, o: longint;

begin
    readln(c, o);
    if (o = 0) then
        writeln('No')
    else begin
        if (o = 1) and (c <> 0) then
            writeln('No')
        else begin
            if (c < o - 1) then
                writeln('No')
            else begin
                c := c - (o - 1);
                if ((c mod 2) = 0) then
                    writeln('Yes')
                else
                    writeln('No')
            end;
        end;
    end;
end.

var
kopy,kop1,r:longint;
begin
readln(kopy,r);
if (r=1)and (kopy>0) then begin writeln('No'); halt; end;
if r=0 then  begin writeln('No'); halt; end;
kop1:=r-1;
if kopy- kop1<0 then  begin writeln('No'); halt; end;
if (kopy-kop1) mod 2=0 then writeln('Yes') else writeln('No');
end.

var x, y: int64;

begin
readln(x ,y);
if (y = 1) and (x > 0) then writeln('NO') else
if (x - y + 1 >= 0) and ((x - y + 1) mod 2 = 0) and (y>0)
	then writeln('Yes')
	else writeln('No');
end.

var
  ex,ey,x,y : integer;
begin
  readln(ex,ey);
  x:=0;
  y:=1;
  while y<ey do
    begin
      inc(x);
      inc(y);
    end;
  while (x<ex) and (x>0) do inc(x,2);
  if (ex=x) and (ey=y)
    then writeln('Yes')
    else writeln('No');
end.

var x, y:longint;
begin readln(x, y);
      if odd(x-y) and (y<>0) and (x>y-2) and not((y=1) and (x>0)) then writeln('Yes')
                                                                  else writeln('No');
end.

var x,y:longint;
begin
readln(x,y);
if y=0 then writeln('NO') else
 begin
  dec(y,1);
  dec(x,y);
  if (x mod 2=0) and (x>=0) then
   begin
    if (x<>0) and (y=0) then writeln('NO') else
     writeln('YES')
   end
  else writeln('NO')
 end
end.

var x,y:longint;
begin
  readln(y,x);
  if (x=1) and (y>0) or (x=0) then
  begin
    writeln('No');
    halt;
  end;
  y:=succ(y-x);
  if (y>=0) and (y mod 2=0) then writeln('Yes')
  else writeln('No');
end.

 var a,b:longint;
begin
 readln(a,b);
 dec(b);
 if b<0 then begin
   writeln('No');
   exit;
 end;
 if b=0 then
   if a>0 then begin
     writeln('No');
     exit;
   end;
 dec(a,b);
 if a<0 then begin
   writeln('No');
   exit;
 end;
 if a mod 2 = 0 then
   writeln('Yes')
 else
   writeln('No');
end.

var a,b:longint;
begin
  readln(a,b);
  if ((b=1)and(a<>0))or(b=0) then
  begin
    writeln('NO');
    exit;
  end;
  dec(b);
  if a-b<0 then writeln('NO') else
  if (a-b) mod 2=0 then writeln('YES') else writeln('NO');
end.

var x,y:longint;
begin
 readln(x,y);
 y:=y-1;
 x:=x-y;
 if (x<0)
 then begin
  writeln('No');
  exit;
 end;
 if (x=0)
 then begin
  writeln('Yes');
  exit;
 end;
 if (x mod 2=0) and (y>0)
 then begin
  writeln('Yes');
  exit;
 end;
 writeln('No');

end.

var
n,m,x,y:int64;
begin
 read(n,m);
  x:=m-1;
  y:=n-x;
  if (n>0) and (m=0) then write('No') else
  if (m=1) and (n>0) then write('No') else
  if (y mod 2 =0) and (y>=0)  then write('Yes') else write('No');
  end.

var x,y:integer;
BEGIN
  read (x,y) ;
  if (y = 1) and (x = 0) or
    (y > 1) and (x+1 >= y) and (((y-1)mod 2) =(x mod 2)) then write('YES')
  else write('NO');
END.

program andyCF922A;
var n,m:longint;
 begin
  readln(n,m);
  if m=0 then
  begin
   writeln('No');
   halt;
  end
  else
   if (m=1)and(n<>0) then
   begin
    writeln('No');
    halt;
   end
   else
    begin
     n:=n-m+1;
      if n<0 then
      begin
       writeln('No');
       halt;
      end;
      if n>=0 then
       if (n mod 2)=0 then
        writeln('Yes')
       else
        writeln('No');
    end;
 end.

Var x,y: longint;
begin
Read(x,y);
y:=y-1;
If (y<=0) and (x>0) then begin Writeln('No');exit;end;
If x<y then Writeln ('No') else If (x-y) mod 2=0 then Writeln ('Yes')
else Writeln ('No')
end.

var
  x, y : longint;
  ans : string;
begin
  readln(x, y);
  ans := 'No';
  if y - x = 1 then ans := 'Yes';
  if (x - y) mod 2 = 1 then ans := 'Yes';
  if (y = 1) and (x > 0) then ans := 'No';
  if y = 0 then ans := 'No';
  writeln(ans);
end.

program r_461_a;
 var i,k,o:longint;
begin
 readln(k,o);
 if((k>0)and(o=0))or((k mod 2=0)and(o mod 2=0))or((k mod 2=1)and(o mod 2=1))or(k-o<-1)or((o=1)and(k>0)) then writeln('No')
                                                                             else writeln('Yes');
end.

var x,y:longint;
begin
read(x,y);
if (y=0) or ((x=0)and(y>1))or(x=y)or((x>y)and(y=1))then write('NO')
else if (x-y = 1)or(y-x=1) then write('YES')
else if y>x then write('NO')
else if ((x-y-1) mod 2)=1 then write('NO')
else write('YES');
end.

//abcdefghijklmnopqrstuvwxyz
var
a,b:longint;
begin
readln(a,b);
if (b=1) and (a>0) then
  begin
  writeln('No');
  exit;
  end;
if (b-1>a) or (b=0) then
  begin
  writeln('No');
  exit;
  end;
a:=a-b+1;

if a mod 2=0 then writeln('Yes') else writeln('No');
end.

var p,p1,p2:longint;s,s1,s2,s3:string;mx1,mx2,mx3,mx4,mx5:int64;n1,n2,n3:real;m,a,t:array[1..10010] of longint;i,j,u:longint;n,no,vmax,max2,max3,f:int64;
Begin
 readln(mx1,mx2);
 if (mx2 = 0) then begin
 write('No',' ');
 halt;
 end;
 if (mx2 = 1) then begin
 if (mx1 = 0 ) then begin
 write('Yes',' ');
 halt;
 end
 else begin
 write('No',' ');
 halt;
 end;
 end;
 if (mx1-mx2+1)<0 then begin
 write('No',' ');
 halt;
 end;
 if ((mx1-mx2+1) mod 2 =1)  then begin
 write('No',' ');
 halt;
 end;
 write('Yes',' ');
 halt;
 End.

var i,j,x,y:longint;
 begin
  read (x,y);
   if y = 0 then writeln ('No')
      else
   if (x > 0) and (y=1) then writeln ('No')
    else
   if (x-y+1>=0) and ((x-y+1) mod 2 = 0) then writeln ('Yes')
        else writeln ('No');

 end.

var i,j,x,y:longint;
 begin
  read (x,y);
   if y = 0 then writeln ('No')
      else
   if (x mod 2 = 0) and (y=1) and (x<>0) then writeln ('No')
    else
   if (x-y+1>=0) and ((x-y+1) mod 2 = 0) then writeln ('Yes')
        else writeln ('No');

 end.

var x,y:longint;
begin
read(x,y);

if (y=0)or(y-1>x) then begin write('no');halt;end;
if (y=1)and(x<>0)then begin write('no');halt;end;
y:=y-1;
if (x-y) mod 2=0then write('yes')
else write('no');

end.

var n,m:longint;
begin
 readln(n,m);
 if ((n-(m-1))mod 2=0)and(n-m>-2)and((m>1)or((m=1)and(n=0))) then
  writeln('Yes')
 else
  writeln('No');
end.

program clone1;
var x,y,o,c:longint;
begin
readln(x,y);
o:=y;
c:=y-1;
while x>c do begin
c:=c+2;
end;
if (y=0) then writeln('No') else
if (y=1) and (x>0) or (y=0) and (x>0) then writeln('No') else
if (x=c) and (y=o) then writeln('Yes') else
if (y=0) and (x=0) then writeln('Yes') else writeln('No');
end.

program clone1;
label 1;
var x,y,o,c:longint;
begin
readln(x,y);
o:=y;
c:=y-1;
while x>c do begin
c:=c+2;
end;
if (y=0) then writeln('No') else
if (y=1) and (x>0) or (y=0) and (x>0) then writeln('No') else
if (x=c) and (y=o) then writeln('Yes') else
if (y=0) and (x=0) then writeln('Yes') else writeln('No');
end.

Var
  X, Y: LongInt;

Begin
  Read(X, Y);
  If ((Y = 0) and (X >= 0)) or ((Y = 1) and (X > 0)) then Write('No')
  Else If ((X - Y + 1) mod 2 = 0) and (Y - X <= 1) then Write('Yes')
  Else Write('No')
End.

var x, y : integer;

begin
  read (x, y);
  if (y = 0) then write ('NO')
  else if (y = 1) then
    begin
      if (x = 0) then write ('YES')
      else write ('NO');
    end
  else
    begin
      if (x >= y - 1) and ((x - y + 1) mod 2 = 0) then write ('YES')
      else write ('NO');
    end;
end.

program a1;
var
x,y:longint;
begin
read(x);
read(y);
if (y=0) or (y=1) and (x<>0)
then
write('No')
else
begin
if y-x>1 then
write('No')
else
begin
x:=(x-y-1) mod 2;
if x=0 then
write('Yes')
else
write('No');
end;
end;
end.

var x,y,k,i:longint;
begin
read(y,x);
if (x<=1)and(y<>0) then begin writeln('No'); halt; end;
if y-(x-1)<0 then begin writeln('No'); halt; end;
y:=y-(x-1);
while y>0 do begin
y:=y-2;
end;
if y=0 then writeln('Yes') else writeln('No');
end.

program p1;
type ma=1..1000000000;
var
x,y,k:ma;
begin
readln (x,y);
if ((x<>0) and (y=1)) or (y=0) or (x<y-1) then writeln ('no') else begin
k:=x-y+1;
if k mod 2=0 then writeln ('yes') else writeln ('no');
end;
end.

var a,b:longint;
begin
  read(b,a);
  if a-1 = b then write('YES') else
  if a-1>b then write('NO')  else
  if ((b-a+1)mod 2=0)and(a>1) then write('YES') else
  write('NO');
end.

   const eps=0.00000001;  besk1=200000008;  nn=200000;
   label 1,2,3,4;
    type    real=double; int64=longint; {string=ansistring;}
    mas=array [-10..nn] of int64;   point=record x,y,z:real;end;
    zap=record p1,p2,p3 :int64;end; zap1=^zap;
    mass=array[0..nn] of longint;mass1=^mass;
    var ogr,q,modul,p,pp,tt,oldtt,qq,qq1,qq2,q1,q2,pos,pmax,imax,p1,p2,p3,p4,t,ot,nm,n,s1,s2,m,s,smin,cen,dl,t2,i1,besk:int64;
    time,jj,step, k,t1,ii,i,j:longint;
     aa,bb,cc:int64;
     l,r,c,dd,zz,z,y,x,aold,b,a:array[-10..2000000] of int64;
     right,down,dda:array[-10..2200,-10..2200] of longint;
   zanx,zany:array[-10..2000000] of boolean;
    sss:string;
     zan,fl:array[-100..2000000] of boolean;
    ss:string;ch:char;
    pole :array [-10..2010,-10..2010] of char;
    maxpr:array[0..nn] of string;
    ss1p1,ss1p2,ss2p1,ss2p2,ss1,ss2:array[0..nn] of string;
     ott,v0,v1,s0,t0:real;
     zv:point;
     newx,newy,xx,yy:array[-1..200000] of int64;

     yot:double;
       flag2,flag,flag1:boolean;
    function al(x,y:real):real; var t0,t1,p,s0,s1:real;
 begin
     if (x>0)and(y>=0) then p:=arctan(y/x);
     if x<0 then p:=pi+arctan(y/x);
     if(x>0)and(y<0) then p:=2*pi+arctan(y/x);
     if x=0 then if (y>=0) then p:=pi/2 else p:=3*pi/2;
     al:=p/pi*180;
 end;
  function min(x,y:int64):int64;begin min:=x;if y<x then min:=y; end;
  function max(x,y:int64):int64;begin max:=x;if y>x then max:=y; end;

  function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

function degg(a,k:int64):int64; var p:int64;
begin
 if k<=0 then degg:=1 else if odd(k) then degg:=degg(a,k-1)*a mod modul else
   begin  p:=degg(a,k div 2); degg:=p*p mod modul;   end;

end;

begin
   { assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
    }
    read(p1,p2);
    flag:=true;
    if p1+1<p2 then flag:=false;
    if not odd(p1+p2) then flag:=false;
    if (p1=1)and(p2=0) then flag:=false;
    if (p1>=2)and(p2=1) then flag:=false;
    if (p1>=1)and(p2=0) then flag:=false;

    if flag then write('YES') else write('NO');

   1:          close(output);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y, i: integer;
begin
  readln (x, y);
  i := y - 1;
  if (y <= 0)then begin
    writeln ('NO');
    exit;
  end;
  if (y = 1) then begin
    if (x = 0) then
      writeln ('YES')
    else
      writeln ('NO');
    exit;
  end;

  if ((x - i) mod 2 = 0) and (x >= (y - 1))then
    writeln ('YES')
  else
    writeln ('NO');
  readln;
  readln;
end.

var x,y:integer;
begin
        readln(x,y);
         if y=0 then write('NO')
           else
            if (y=1) and (x=0) then write('YES');
        if ((x-y-1) and 1 )=(x and 1) then write('YES')
         else
           write('NO');
end.

Var o,ik,io:integer;
Begin
Read(ik,io);
If ik>io-2 then begin
  If (ik-io+1) mod 2 = 0 then write('Yes') else write('No');
end;
End.

var n,m:longint;
begin
 readln(n,m);
 if (n-(m-1))mod 2=0 then
  writeln('Yes')
 else
  writeln('No');
end.

Var x,y: longint;
begin
Read(x,y);
If y=0 then begin Writeln('No');exit;end;
If y-x=1 then begin Writeln('Yes');exit;end else
If x<y then Writeln ('No') else If (y-x) mod 2<>0 then Writeln ('Yes')
else Writeln ('No')
end.

program clone1;
label 1;
var x,y:integer;
begin
readln(x,y);
if (x>y) or (x=y-1) then
if (x mod 2=0) and (y mod 2=1) then writeln('Yes') else else writeln('No');
end.

var x,y,ans:longint;
begin
 {assign(input,'input.txt');
 reset(input);}
 read(x); read(y);
 {close(input);
 assign(output,'output.txt');
 rewrite(output); }
 ans:=x-(y-1);
 if (ans>=0) and (ans mod 2 = 0) and not ((y=1) and (x>0)) then write('Yes')
 else write('No');
 //close(output);
end.

var
n,m,x,y:int64;
begin
 read(n,m);
  x:=m-1;
  y:=n-x;
  if (m=1) and (n>0) then write('No') else
  if (y mod 2 =0) and (y>=0)  then write('Yes') else write('No');
  end.

program z1;
 var x, y, z :longint;
begin
 readln( x, y );
 if (y > x) and (x + 1 <> y)
    then write( 'No' )
    else begin
 z := x - ( y - 1 );
 if (z mod 2 = 0) or (x+1 = y)
    then write( 'Yes' )
    else write( 'No' );
end;
end.

program zzz;
var
  t:boolean;
  x,y:longint;
begin
  readln(x,y);
  t:=false;
  if (x>0) and (y>1) then
  begin
    if (x-y+3)mod 2 =0 then t:=true;
    if (x-y)mod 2 = 0 then t:=true;
  end;
  if (x>0)and(y=0)and(x mod 2=1) then t:=true;
  if (x=0)and(y<2) then
    t:=true;
  if t then writeln('yes')
       else writeln('no');
end.

var x, y, n:longint;
begin readln(x, y);
      n:=x-y+1;
      if (n mod 2=0) and (y<>0) and (x>0) and (x>y-2) then writeln('Yes')
                                                       else writeln('No');
end.

var a,b:longint;
begin
  readln(a,b);
  if ((b=1)and(a<>0))or(b=0) then
  begin
    writeln('NO');
    exit;
  end;
  dec(b);
  if (a-b) mod 2=0 then writeln('YES') else writeln('NO');
end.

var
  x, y, copya : longint;
begin
  readln(x, y);
  copya := 0;
  inc(copya, y - 1);
  if (x < copya) or ((x - copya) mod 2 <> 0) then writeln('NO')
  else if (x = copya) or ((x - copya) mod 2 = 0) then writeln('Yes');
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y, i: integer;
begin
  readln (x, y);
  if (x = 1) and (y = 0) then begin
    writeln ('NO');
    exit;
  end;
  i := y - 1;
  if (i <= 0)then begin
    writeln ('YES');
    exit;
  end;

  if ((x - i) mod 2 = 0) and (x >= (y - 1))then
    writeln ('YES')
  else
    writeln ('NO');
  readln;
  readln;
end.

var x, y, n:longint;
begin readln(x, y);
      n:=x-y+1;
      if (n mod 2=0) and (x+1>x) and (n>=0) then writeln('Yes')
                                            else writeln('No');
end.

program r_461_a;
 var i,k,o:longint;
begin
 readln(k,o);
 if((k>0)and(o=0))or((k mod 2=0)and(o mod 2=0))or((k mod 2=0)and(o mod 2=0))and(k-o<-1) then writeln('No')
                                                                             else writeln('Yes');
end.

var x, y:longint;
begin readln(x, y);
      if odd(x-y) and (y<>0) and (x>y-2) and ((y<>1) and (x<>2)) then writeln('Yes')
                                                                 else writeln('No');
end.

var i,j,x,y:longint;
 begin
  read (x,y);
   if y = 0 then writeln ('No')
      else
   if (x mod 2 = 0) and (y=1) then writeln ('No')
    else
   if (x-y+1>=0) and ((x-y+1) mod 2 = 0) then writeln ('Yes')
        else writeln ('No');

 end.

var
  x, y : longint;
  ans : string;
begin
  readln(x, y);
  ans := 'No';
  if abs(y - x) = 1 then ans := 'Yes';
  if (y = 1) and (x > 0) then ans := 'No';
  if y = 0 then ans := 'No';
  writeln(ans);
end.

var
n,m,x,y:int64;
begin
 read(n,m);
  x:=m-1;
  y:=x;
  if (y=n) then write('Yes') else
  begin
  y:=y+x*2;
  if ((n-y) mod 2 =0) and (n-y>=0) then write('Yes') else write('No');
  end;
  end.

Var x,y: longint;
begin
Read(x,y);
y:=y-1;
If x<y then Writeln ('No') else If (x-y) mod 2=0 then Writeln ('Yes')
else Writeln ('No')
end.

program r_461_a;
 var i,k,o:longint;
begin
 readln(k,o);
 if((k>0)and(o=0))or((k mod 2=0)and(o mod 2=0))or((k mod 2=1)and(o mod 2=1))or(k-o<-1) then writeln('No')
                                                                             else writeln('Yes');
end.

program z1;
var x,y,nac,nac1:longint;
begin
nac:=1;
nac1:=0;
read(x,y);
while nac<y do
   begin
   inc(nac);
   inc(nac1);
   end;
if (x-nac1) mod 2=0 then write('YES')
else write('NO');
end.

var n,m:longint;
begin
 readln(n,m);
 if ((n-(m-1))mod 2=0)and(n-m>-2) then
  writeln('Yes')
 else
  writeln('No');
end.

   const eps=0.00000001;  besk1=200000008;  nn=200000;
   label 1,2,3,4;
    type    real=double; int64=longint; {string=ansistring;}
    mas=array [-10..nn] of int64;   point=record x,y,z:real;end;
    zap=record p1,p2,p3 :int64;end; zap1=^zap;
    mass=array[0..nn] of longint;mass1=^mass;
    var ogr,q,modul,p,pp,tt,oldtt,qq,qq1,qq2,q1,q2,pos,pmax,imax,p1,p2,p3,p4,t,ot,nm,n,s1,s2,m,s,smin,cen,dl,t2,i1,besk:int64;
    time,jj,step, k,t1,ii,i,j:longint;
     aa,bb,cc:int64;
     l,r,c,dd,zz,z,y,x,aold,b,a:array[-10..2000000] of int64;
     right,down,dda:array[-10..2200,-10..2200] of longint;
   zanx,zany:array[-10..2000000] of boolean;
    sss:string;
     zan,fl:array[-100..2000000] of boolean;
    ss:string;ch:char;
    pole :array [-10..2010,-10..2010] of char;
    maxpr:array[0..nn] of string;
    ss1p1,ss1p2,ss2p1,ss2p2,ss1,ss2:array[0..nn] of string;
     ott,v0,v1,s0,t0:real;
     zv:point;
     newx,newy,xx,yy:array[-1..200000] of int64;

     yot:double;
       flag2,flag,flag1:boolean;
    function al(x,y:real):real; var t0,t1,p,s0,s1:real;
 begin
     if (x>0)and(y>=0) then p:=arctan(y/x);
     if x<0 then p:=pi+arctan(y/x);
     if(x>0)and(y<0) then p:=2*pi+arctan(y/x);
     if x=0 then if (y>=0) then p:=pi/2 else p:=3*pi/2;
     al:=p/pi*180;
 end;
  function min(x,y:int64):int64;begin min:=x;if y<x then min:=y; end;
  function max(x,y:int64):int64;begin max:=x;if y>x then max:=y; end;

  function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

function degg(a,k:int64):int64; var p:int64;
begin
 if k<=0 then degg:=1 else if odd(k) then degg:=degg(a,k-1)*a mod modul else
   begin  p:=degg(a,k div 2); degg:=p*p mod modul;   end;

end;

begin
   { assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
    }
    read(p1,p2);
    flag:=true;
    if p1+1<p2 then flag:=false;
    if not odd(p1+p2) then flag:=false;
    if (p1=1)and(p2=0) then flag:=false;
    if (p1>=2)and(p2=1) then flag:=false;

    if flag then write('YES') else write('NO');

   1:          close(output);
end.

var x, y, n:longint;
begin readln(x, y);
      n:=x-y+1;
      if (n mod 2=0) and (y<>0) and (n>=0) and (x>y-2) then writeln('Yes')
                                                       else writeln('No');
end.

var
n,m,x,y:int64;
begin
 read(n,m);
  x:=m-1;
  y:=n-x;
  if (m=1) and (n>0) then write('No') else
  if (y mod 2 =0) and (y>=0)  then write('Yes') else write('No');
  end.

program clone1;
var x,y:integer;
begin
readln(x,y);
if (x mod 2=0) and (y mod 2=1) then writeln('Yes') else writeln('No');
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y, i: integer;
begin
  readln (x, y);
  i := y - 1;
  if (y <= 0)then begin
    writeln ('NO');
    exit;
  end;
  if (y = 1) and (x = 0) then begin
    writeln ('YES');
    exit;
  end;

  if ((x - i) mod 2 = 0) and (x >= (y - 1))then
    writeln ('YES')
  else
    writeln ('NO');
  readln;
  readln;
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y, i: integer;
begin
  readln (x, y);
  if (x = 1) and (y = 0) then begin
    writeln ('NO');
    exit;
  end;
  i := y - 1;
  if ((x - i) mod 2 = 0) then
    writeln ('YES')
  else
    writeln ('NO');
  readln;
  readln;
end.

program z1;
 var x, y, z :longint;
begin
 readln( x, y );
 if x < y
 then write ('No')
 else begin
 if (y = 1) and (x - y mod 2 <> 0)
 then write ('No')
 else begin
 if (y > x) and (x + 1 <> y) or (y=0)
    then write( 'No' )
    else begin
 z := x - ( y - 1 );
 if (z mod 2 = 0) or (x+1 = y)
    then write( 'Yes' )
    else write( 'No' );
end;
end;
end;
end.

var
  x, y, copya : longint;
begin
  readln(x, y);
  copya := 0;
  inc(copya, y - 1);
  if (x = 0) or (y = 0) or (y = 1) then begin writeln('NO');exit;end;
  if (x < copya) or ((x - copya) mod 2 <> 0) then writeln('NO')
  else if (x = copya) or ((x - copya) mod 2 = 0) then writeln('Yes');
end.

var x,y:longint;
begin
        readln(x,y);
         if y=0 then write('NO');

           if (y=1)  then
                    if x=0 then write('YES')
                        else write('NO');
          if (x>=(y-1)) and ((x-y+1) mod 2=0)  then write('YES')
           else
             write('NO');

end.

var x, y, n:longint;
begin readln(x, y);
      n:=x-y+1;
      if (n mod 2=0) and (y-1>0) and (n>=0) then writeln('Yes')
                                            else writeln('No');
end.

var x, y, n:longint;
begin readln(x, y);
      n:=x-y+1;
      if (n mod 2=0) and (y<>0) and (x>y-2) then writeln('Yes')
                                            else writeln('No');
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y, i: integer;
begin
  readln (x, y);
  if (x = 1) and (y = 0) then begin
    writeln ('NO');
    exit;
  end;
  i := y - 1;
  if ((x - i) mod 2 = 0) and (i < (y - 1))then
    writeln ('YES')
  else
    writeln ('NO');
  readln;
  readln;
end.

program z1;
var x,y,nac,nac1:longint;
begin
read(x,y);
nac:=y;
if y=0 then begin write('NO');exit;end;
nac1:=y-1;
if y=1 then nac1:=y;
   while nac1<x do inc(nac1,2);
if nac1=x then write('YES')
else write('NO');
end.

var
  x,y,ro,kl : longint;
begin
  readln(x,y);
  if y>=x then begin writeln('No'); halt; end;
  kl:=y-1;
  ro:=y;
  if (x-kl) mod 2=0 then writeln('Yes') else writeln('No');
end.

var x,y,k,i:longint;
begin
read(y,x);
if y-(x-1)<0 then begin writeln('No'); halt; end;
y:=y-(x-1);
while y>0 do begin
y:=y-2;
end;
if y=0 then writeln('Yes') else writeln('No');
end.

var i,j,x,y:longint;
 begin
  read (x,y);
   if y = 0 then writeln ('No')
      else
   if (x mod 2 = 0) and (y=1) then writeln ('No')
    else
   if (x-y+1>=0) and ((x-y+1) mod 2 = 0) then writeln ('Yes')
        else writeln ('No');

 end.

var x,y:longint;
begin
read(x,y);
if (y=0) or ((x=0)and(y>1))or(x=y)or((x-y=1)and(y=1))then write('NO')
else if (x-y = 1)or(y-x=1) then write('YES')
else if y>x then write('NO')
else if ((x-y-1) mod 2)=1 then write('NO')
else write('YES');
end.

var x,y,k,i:longint;
begin
read(x,y);
while x>1 do begin
inc(i);
x:=x div 2;
k:=k+i;
end;
if y-k>=0 then writeln('Yes') else writeln('No');
end.

program p1;
type ma=1..1000000000;
var
x,y,k:ma;
begin
readln (x,y);
if ((x<>0) and (y=1)) or (y=0) or (x<y) then writeln ('no') else begin
k:=x-y+1;
if k mod 2=0 then writeln ('yes') else writeln ('no');
end;
end.

program r_461_a;
 var i,k,o:longint;
begin
 readln(k,o);
 if (k-o=1)or((o mod 2=0)and(k mod 2=1))or((o mod 2=1)and(k mod 2=0))
 then writeln('Yes')
                                 else writeln('No');
end.

var x,y:longint;
begin
readln(x,y);
if (y=0) or (x=0) then writeln('NO') else
 begin
  dec(y,1);
  dec(x,y);
  if (x mod 2=0) and (y<>0) and (x>=0) then writeln('YES') else writeln('NO')
 end
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y, i, j: integer;
begin
  readln (x, y);
  if (x = 1) and (y = 0) then begin
    writeln ('NO');
    exit;
  end;
  i := y - 1;
  if (i mod 2 = 0) then
    writeln ('YES')
  else
    writeln ('NO');
  readln;
  readln;
end.

program z1;
var x,y,nac,nac1:longint;
begin
read(x,y);
nac:=y;
if y=0 then begin write('NO');exit;end;
nac1:=y-1;
   while nac1<x do inc(nac1,2);
if nac1=x then write('YES')
else write('NO');
end.

program cloning;
uses wincrt;
var x,y,z : longint;
begin
readln(x,y);
dec(y);
if((x-y) mod 2 = 0)then
begin
   writeln('Yes');
end
else
begin
   writeln('No');
end;
end.

var x,y:longint;
begin
        readln(x,y);
         if y=0 then write('NO');

           if (y=1)  then
                    if x=0 then write('YES')
                        else write('NO');
          if (x>=(y-1)) and ((x-y+1) mod 2=0)  then write('YES')
           else
             write('NO');

end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y, i, j: integer;
begin
  readln (x, y);
  if (x = 1) and (y = 0) then begin
    writeln ('NO');
    exit;
  end;
  i := y - 1;
  while (i < x) do begin
    inc (i, 2);
  end;
  if (i = x) then
    writeln ('YES')
  else
    writeln ('NO');
  readln;
  readln;
end.

var x,y: longint;
begin
readln (x,y);
if (x>=y-1) and ((x+1-y) mod 2 = 0) then writeln ('YES') else writeln ('NO');
end.

program CloningToys;
var x,y: longint;
BEGIN
readln(x,y);
//countOforiginal:=0;
//countOfCopies:=0;
if (y=0) then begin
 writeln('no');
 exit;
end;
if (y>1) and (x<y-1) then begin
 writeln('no');
 exit;
end;
x:=x-y+1;
if (odd(y)) then writeln('yes') else writeln('no');
END.

var x,y:int64;
begin
read(y,x);
if (y=1) and (x<>0) then begin  write('No'); exit end;
if (y=0) then begin  write('No'); exit end;
if (y>=x-1) and (y mod 2 = (x-1) mod 2) then write('Yes') else write('No')
end.

var x,y:longint;
begin
read(x,y);
if (y=0) or ((x=0)and(y>1))or(x=y)then write('NO')
else if (x-y=1)or(y-x=1) then write('YES')
else if y>x then write('NO')
else if ((x-y-1) mod 2)=1 then write('NO')
else write('YES');
end.

program zzz;
var
  x,y:longint;
begin
  readln(x,y);
  if ((x-y+1)mod 2=0)and(x>0)and (y>0)  then writeln('yes')
                     else writeln('no');
end.

var x, y, n:longint;
begin readln(x, y);
      n:=y-x+1;
      if (n mod 2=0) and (x+1>x) and (n>=0) then writeln('Yes')
                                            else writeln('No');
end.

Var x,y: longint;
begin
Read(x,y);
y:=y-1;
If x<y then Writeln ('No') else If (x-y) mod 2=0 then Writeln ('Yes')
else Writeln ('No')
end.

var x,y,k,i:longint;
begin
read(x,y);
while x>1 do begin
inc(i);
x:=x div 2;
k:=k+i;
end;
if y-k>=0 then writeln('Yes') else writeln('No');
end.

program r_461_a;
 var i,k,o:longint;
begin
 readln(k,o);
 if((k>0)and(o=0))or((k mod 2=0)and(o mod 2=0))or((k mod 2=0)and(o mod 2=0))and(k-o<-1) then writeln('No')
                                                                             else writeln('Yes');
end.

program cloning;
uses wincrt;
var x,y,z : longint;
begin
readln(x,y);
dec(y);
if(((x-y) mod 2 = 0 )and (x >= y))then
begin
   writeln('Yes');
end
else
begin
   writeln('No');
end;
end.

var
  x, y, copya : longint;
begin
  readln(x, y);
  copya := 0;
  inc(copya, y - 1);
  if (x < copya) or ((x - copya) mod 2 <> 0) then writeln('NO')
  else if (x = copya) or ((x - copya) mod 2 = 0) then writeln('Yes');
end.

program zzz;
var
  t:boolean;
  x,y:longint;
begin
  readln(x,y);
  t:=false;
  if (x>0) and (y>1) then
  begin
    if (x-y+3)mod 2 =0 then  t:=true;
  end;
  if (x=0)and(y=1) then
    t:=true;
  if t then writeln('yes')
       else writeln('no');
end.

var x,y:integer;
begin
        readln(x,y);
         if y=0 then write('NO')
           else
            if (y=1) and (x=0) then write('YES');
        if ((x-y-1) and 1 )=(x and 1) then write('YES')
         else
           write('NO');
end.

program r_461_a;
 var i,k,o:longint;
begin
 readln(k,o);
 if (k-o=1)or((o mod 2=0)and(k mod 2=1))or((o mod 2=1)and(k mod 2=0))
 then writeln('Yes')
                                 else writeln('No');
end.

var x,y,m,n:longint;
begin
readln(x,y);
m:=1;
n:=0;
if y>0 then
while m<>y do begin
              inc(m);
              inc(n);
              end;
if m=y then if n<x then while n<x do n:=n+2;
if (m=y) and (n=x) then writeln('YES')
                   else writeln('NO');
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y, i: integer;
begin
  readln (x, y);
  if (x = 1) and (y = 0) then begin
    writeln ('NO');
    exit;
  end;
  i := y - 1;
  if ((x - i) mod 2 = 0) and (x >= (y - 1)) and ((x-i) <> x)then
    writeln ('YES')
  else
    writeln ('NO');
  readln;
  readln;
end.

var
n,m,x,y:int64;
begin
 read(n,m);
  x:=m-1;
  y:=n-x;
  if (y mod 2 =0)   then write('Yes') else write('No');
  end.

var x,y:longint;
begin
read(x,y);
y:=y-1;
if (x-y) mod 2=0then write('yes')
else write('no');
end.

program zzz;
var
  t:boolean;
  x,y:longint;
begin
  readln(x,y);
  t:=false;
  if (x>0) and (y>=1) then
  begin
    if (x-y+1)mod 2 =0 then t:=true;
    if (x-y)mod 2 = 0 then t:=true;
  end;
  if (x=0)and(y<2) then
    t:=true;
  if t then writeln('yes')
       else writeln('no');
end.

var
  x, y: LongInt;

begin
  ReadLn(x, y);
  If abs(x-y) mod 2 = 1 then WriteLn('Yes') else WriteLn('No');
end.

var
  ex,ey,x,y : integer;
begin
  readln(ex,ey);
  x:=0;
  y:=1;
  while y<ey do
    begin
      inc(x);
      inc(y);
    end;
  while x<ex do inc(x,2);
  if (ex=x) and (ey=y)
    then writeln('Yes')
    else writeln('No');
end.

var
n,m,x,y:int64;
begin
 read(n,m);
  x:=m-1;
  y:=x;
  if (y=n) then write('Yes') else
  begin
  y:=y+x*2;
  if ((n-y) mod 2 =0) and (n-y>=0) then write('Yes') else write('No');
  end;
  end.

Var o,ik,io:integer;
Begin
Read(ik,io);
If ik>io-2 then begin
  If (ik-io+1) mod 2 = 0 then write('Yes') else write('No');
end else write('No');
End.

var x, y, n:longint;
begin readln(x, y);
      n:=x-y+1;
      if (n mod 2=0) and (y<>0) and (n>=0) and (x>y-2) then writeln('Yes')
                                                       else writeln('No');
end.

   const eps=0.00000001;  besk1=200000008;  nn=200000;
   label 1,2,3,4;
    type    real=double; int64=longint; {string=ansistring;}
    mas=array [-10..nn] of int64;   point=record x,y,z:real;end;
    zap=record p1,p2,p3 :int64;end; zap1=^zap;
    mass=array[0..nn] of longint;mass1=^mass;
    var ogr,q,modul,p,pp,tt,oldtt,qq,qq1,qq2,q1,q2,pos,pmax,imax,p1,p2,p3,p4,t,ot,nm,n,s1,s2,m,s,smin,cen,dl,t2,i1,besk:int64;
    time,jj,step, k,t1,ii,i,j:longint;
     aa,bb,cc:int64;
     l,r,c,dd,zz,z,y,x,aold,b,a:array[-10..2000000] of int64;
     right,down,dda:array[-10..2200,-10..2200] of longint;
   zanx,zany:array[-10..2000000] of boolean;
    sss:string;
     zan,fl:array[-100..2000000] of boolean;
    ss:string;ch:char;
    pole :array [-10..2010,-10..2010] of char;
    maxpr:array[0..nn] of string;
    ss1p1,ss1p2,ss2p1,ss2p2,ss1,ss2:array[0..nn] of string;
     ott,v0,v1,s0,t0:real;
     zv:point;
     newx,newy,xx,yy:array[-1..200000] of int64;

     yot:double;
       flag2,flag,flag1:boolean;
    function al(x,y:real):real; var t0,t1,p,s0,s1:real;
 begin
     if (x>0)and(y>=0) then p:=arctan(y/x);
     if x<0 then p:=pi+arctan(y/x);
     if(x>0)and(y<0) then p:=2*pi+arctan(y/x);
     if x=0 then if (y>=0) then p:=pi/2 else p:=3*pi/2;
     al:=p/pi*180;
 end;
  function min(x,y:int64):int64;begin min:=x;if y<x then min:=y; end;
  function max(x,y:int64):int64;begin max:=x;if y>x then max:=y; end;

  function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

function degg(a,k:int64):int64; var p:int64;
begin
 if k<=0 then degg:=1 else if odd(k) then degg:=degg(a,k-1)*a mod modul else
   begin  p:=degg(a,k div 2); degg:=p*p mod modul;   end;

end;

begin
   { assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
    }
    read(p1,p2);
    flag:=true;
    if p1+1<p2 then flag:=false;
    if not odd(p1+p2) then flag:=false;
    if flag then write('YES') else write('NO');

   1:          close(output);
end.

var x, y, n:longint;
begin readln(x, y);
      n:=y-x+1;
      if (n mod 2=0) and (x+1>x) and (n>=0) then writeln('Yes')
                                            else writeln('No');
end.

var
  x, y : longint;
  ans : string;
begin
  readln(x, y);
  ans := 'No';
  if abs(y - x) = 1 then ans := 'Yes';
  if (y = 1) and (x > 0) then ans := 'No';
  if y = 0 then ans := 'No';
  writeln(ans);
end.

var x,y:integer;
begin
        readln(x,y);
         if y=0 then write('NO');
            if (y=1) and (x=0) then write('YES')
             else
                write('N0');
            if y>1 then
        if ((x-y-1) and 1 )=(x and 1) then write('YES')
         else
           write('NO');
end.

Var
  X, Y: LongInt;

Begin
  Read(X, Y);
  If ((X - Y + 1) mod 2 = 0) and (Y - X <= 1) then Write('Yes')
  Else Write('No')
End.

var x,y:longint;
begin
readln(x,y);
if y=0 then writeln('NO') else
 begin
  dec(y,1);
  dec(x,y);
  if (x mod 2=0) and (y<>0) and (x>=0) then writeln('YES') else writeln('NO')
 end
end.

program r_461_a;
 var i,k,o:longint;
begin
 readln(k,o);
 if (k-o=1)or((o mod 2=0)and(k mod 2=1))or((o mod 2=1)and(k mod 2=0))
 then writeln('Yes')
                                 else writeln('No');
end.

program CloningToys;
var x,y: longint;
BEGIN
readln(x,y);
if (y=0) then begin
 writeln('no');
 exit;
end;
if (y>1) and (x<y-1) then begin
 writeln('no');
 exit;
end;
if (y=1) and (x<>0) then begin
 writeln('no');
end;
x:=x-y+1;
if (odd(x)) then writeln('no') else writeln('yes');
END.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y, i, j: int64;
begin
  readln (x, y);
  i := y - 1;
  while (i < x) do begin
    inc (i, 2);
  end;
  if (i = x) then
    writeln ('YES')
  else
    writeln ('NO');
  readln;
  readln;
end.

program zzz;
var
  x,y:longint;
begin
  readln(x,y);
  if ((x-y+1)mod 2=0)and(x>0)and (y>1)  then writeln('yes')
                     else writeln('no');
end.

var x,y:longint;
begin
read(x,y);
if (x=y)or(y-x=1) then write('YES')
else if y>x then write('NO')
else if (x-y-1 mod 2)=1 then write('NO')
else write('YES');
end.

var x,y:longint;
begin
read(x,y);
if (x-y=1)or(y-x=1) then write('YES')
else if y>x then write('NO')
else if ((x-y-1) mod 2)=1 then write('NO')
else write('YES');
end.