import java.util.*;

class Main{
public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int a = sc.nextInt();
   int b = sc.nextInt();
   for (double price=0;price<200000;price++){
     int tax8 = (int)(price*0.08);
     int tax10 = (int)(price*0.1);
     if ((tax8 == a)&&(tax10 == b)){
        System.out.println((int)price);
        System.exit(0);
     }
   }
   System.out.println(-1);
}
} import java.util.*; util.* java class Main{
public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int a = sc.nextInt();
   int b = sc.nextInt();
   for (double price=0;price<200000;price++){
     int tax8 = (int)(price*0.08);
     int tax10 = (int)(price*0.1);
     if ((tax8 == a)&&(tax10 == b)){
        System.out.println((int)price);
        System.exit(0);
     }
   }
   System.out.println(-1);
}
} Main public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int a = sc.nextInt();
   int b = sc.nextInt();
   for (double price=0;price<200000;price++){
     int tax8 = (int)(price*0.08);
     int tax10 = (int)(price*0.1);
     if ((tax8 == a)&&(tax10 == b)){
        System.out.println((int)price);
        System.exit(0);
     }
   }
   System.out.println(-1);
} main {
   Scanner sc = new Scanner(System.in);
   int a = sc.nextInt();
   int b = sc.nextInt();
   for (double price=0;price<200000;price++){
     int tax8 = (int)(price*0.08);
     int tax10 = (int)(price*0.1);
     if ((tax8 == a)&&(tax10 == b)){
        System.out.println((int)price);
        System.exit(0);
     }
   }
   System.out.println(-1);
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc for (double price=0;price<200000;price++){
     int tax8 = (int)(price*0.08);
     int tax10 = (int)(price*0.1);
     if ((tax8 == a)&&(tax10 == b)){
        System.out.println((int)price);
        System.exit(0);
     }
   } double price=0; double price=0; price 0 price<200000 price 200000 price++ price++ price {
     int tax8 = (int)(price*0.08);
     int tax10 = (int)(price*0.1);
     if ((tax8 == a)&&(tax10 == b)){
        System.out.println((int)price);
        System.exit(0);
     }
   } {
     int tax8 = (int)(price*0.08);
     int tax10 = (int)(price*0.1);
     if ((tax8 == a)&&(tax10 == b)){
        System.out.println((int)price);
        System.exit(0);
     }
   } int tax8 = (int)(price*0.08); tax8 (int)(price*0.08) price 0.08 int tax10 = (int)(price*0.1); tax10 (int)(price*0.1) price 0.1 if ((tax8 == a)&&(tax10 == b)){
        System.out.println((int)price);
        System.exit(0);
     } (tax8 == a)&&(tax10 == b) (tax8 == a) tax8 a (tax10 == b) tax10 b {
        System.out.println((int)price);
        System.exit(0);
     } System.out.println((int)price) System.out.println System.out System System.out (int)price System.exit(0) System.exit System 0 System.out.println(-1) System.out.println System.out System System.out -1 1 String args[] args
import java.util.*;

class Main{
public static void main(String args[]){
   Scanner sc = new Scanner(System.in);
   int a = sc.nextInt();
   int b = sc.nextInt();
   for (double price=0;price<200000;price++){
     int tax8 = (int)(price*0.08);
     int tax10 = (int)(price*0.1);
     if ((tax8 == a)&&(tax10 == b)){
        System.out.println((int)price);
        System.exit(0);
     }
   }
   System.out.println(-1);
}
}