import java.util.Scanner;
public class Main{
  public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int ans = -1;
    int ax;
    int bx;
    for(int i = 1; i <= 1000; i++){
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    }
    System.out.println(ans);
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int ans = -1;
    int ax;
    int bx;
    for(int i = 1; i <= 1000; i++){
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int ans = -1;
    int ax;
    int bx;
    for(int i = 1; i <= 1000; i++){
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    }
    System.out.println(ans);
  } main {
  Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int ans = -1;
    int ax;
    int bx;
    for(int i = 1; i <= 1000; i++){
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    }
    System.out.println(ans);
  } 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 int ans = -1; ans -1 1 int ax; ax int bx; bx for(int i = 1; i <= 1000; i++){
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    } int i = 1; int i = 1; i 1 i <= 1000 i 1000 i++ i++ i {
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    } {
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    } ax = (int) (i*0.08) ax (int) (i*0.08) i 0.08 bx = (int) (i*0.1) bx (int) (i*0.1) i 0.1 if(ax == a && bx == b){
         ans = i;
         break;
       } ax == a && bx == b ax == a ax a bx == b bx b {
         ans = i;
         break;
       } ans = i ans i break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
  public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int ans = -1;
    int ax;
    int bx;
    for(int i = 1; i <= 1000; i++){
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    }
    System.out.println(ans);
  }
} public class Main{
  public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int ans = -1;
    int ax;
    int bx;
    for(int i = 1; i <= 1000; i++){
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    }
    System.out.println(ans);
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int ans = -1;
    int ax;
    int bx;
    for(int i = 1; i <= 1000; i++){
       ax = (int) (i*0.08);
       bx = (int) (i*0.1);
       if(ax == a && bx == b){
         ans = i;
         break;
       }
    }
    System.out.println(ans);
  }
}