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