import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    byte a = sc.nextByte();
    byte b = sc.nextByte();
    double c = a/0.08;
    double d = (a+1)/0.08;
    double e = b/0.1;
    double f = (b+1)/0.1;
    double max = Math.max(c,e);
    double min = Math.min(d,f);
    if(c >= f || e >= d){
      System.out.println(-1);
    }else if(Math.ceil(max)<min){
      System.out.println((int)Math.ceil(max));
    }else{
      System.out.println(-1);
    }
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    byte a = sc.nextByte();
    byte b = sc.nextByte();
    double c = a/0.08;
    double d = (a+1)/0.08;
    double e = b/0.1;
    double f = (b+1)/0.1;
    double max = Math.max(c,e);
    double min = Math.min(d,f);
    if(c >= f || e >= d){
      System.out.println(-1);
    }else if(Math.ceil(max)<min){
      System.out.println((int)Math.ceil(max));
    }else{
      System.out.println(-1);
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    byte a = sc.nextByte();
    byte b = sc.nextByte();
    double c = a/0.08;
    double d = (a+1)/0.08;
    double e = b/0.1;
    double f = (b+1)/0.1;
    double max = Math.max(c,e);
    double min = Math.min(d,f);
    if(c >= f || e >= d){
      System.out.println(-1);
    }else if(Math.ceil(max)<min){
      System.out.println((int)Math.ceil(max));
    }else{
      System.out.println(-1);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    byte a = sc.nextByte();
    byte b = sc.nextByte();
    double c = a/0.08;
    double d = (a+1)/0.08;
    double e = b/0.1;
    double f = (b+1)/0.1;
    double max = Math.max(c,e);
    double min = Math.min(d,f);
    if(c >= f || e >= d){
      System.out.println(-1);
    }else if(Math.ceil(max)<min){
      System.out.println((int)Math.ceil(max));
    }else{
      System.out.println(-1);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) byte a = sc.nextByte(); a sc.nextByte() sc.nextByte sc byte b = sc.nextByte(); b sc.nextByte() sc.nextByte sc double c = a/0.08; c a/0.08 a 0.08 double d = (a+1)/0.08; d (a+1)/0.08 (a+1) a 1 0.08 double e = b/0.1; e b/0.1 b 0.1 double f = (b+1)/0.1; f (b+1)/0.1 (b+1) b 1 0.1 double max = Math.max(c,e); max Math.max(c,e) Math.max Math c e double min = Math.min(d,f); min Math.min(d,f) Math.min Math d f if(c >= f || e >= d){
      System.out.println(-1);
    }else if(Math.ceil(max)<min){
      System.out.println((int)Math.ceil(max));
    }else{
      System.out.println(-1);
    } c >= f || e >= d c >= f c f e >= d e d {
      System.out.println(-1);
    } System.out.println(-1) System.out.println System.out System System.out -1 1 if(Math.ceil(max)<min){
      System.out.println((int)Math.ceil(max));
    }else{
      System.out.println(-1);
    } Math.ceil(max)<min Math.ceil(max) Math.ceil Math max min {
      System.out.println((int)Math.ceil(max));
    } System.out.println((int)Math.ceil(max)) System.out.println System.out System System.out (int)Math.ceil(max) Math.ceil Math max {
      System.out.println(-1);
    } System.out.println(-1) System.out.println System.out System System.out -1 1 String[] args args
import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    byte a = sc.nextByte();
    byte b = sc.nextByte();
    double c = a/0.08;
    double d = (a+1)/0.08;
    double e = b/0.1;
    double f = (b+1)/0.1;
    double max = Math.max(c,e);
    double min = Math.min(d,f);
    if(c >= f || e >= d){
      System.out.println(-1);
    }else if(Math.ceil(max)<min){
      System.out.println((int)Math.ceil(max));
    }else{
      System.out.println(-1);
    }
  }
}