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();
      int x = 1;
      while(true) {
          int A = (int)(x * 0.08 * 10) / 10;
          int B = (int)(x * 0.1 * 10) / 10;
        if(A == a && B == b) {
            System.out.println(x);
            return;
        }
        if(A > a && B > b)
            break;
        x++;
      }
      System.out.println(-1);
  }
} 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();
      int x = 1;
      while(true) {
          int A = (int)(x * 0.08 * 10) / 10;
          int B = (int)(x * 0.1 * 10) / 10;
        if(A == a && B == b) {
            System.out.println(x);
            return;
        }
        if(A > a && B > b)
            break;
        x++;
      }
      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();
      int x = 1;
      while(true) {
          int A = (int)(x * 0.08 * 10) / 10;
          int B = (int)(x * 0.1 * 10) / 10;
        if(A == a && B == b) {
            System.out.println(x);
            return;
        }
        if(A > a && B > b)
            break;
        x++;
      }
      System.out.println(-1);
  } main { 
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int x = 1;
      while(true) {
          int A = (int)(x * 0.08 * 10) / 10;
          int B = (int)(x * 0.1 * 10) / 10;
        if(A == a && B == b) {
            System.out.println(x);
            return;
        }
        if(A > a && B > b)
            break;
        x++;
      }
      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 int x = 1; x 1 while(true) {
          int A = (int)(x * 0.08 * 10) / 10;
          int B = (int)(x * 0.1 * 10) / 10;
        if(A == a && B == b) {
            System.out.println(x);
            return;
        }
        if(A > a && B > b)
            break;
        x++;
      } true {
          int A = (int)(x * 0.08 * 10) / 10;
          int B = (int)(x * 0.1 * 10) / 10;
        if(A == a && B == b) {
            System.out.println(x);
            return;
        }
        if(A > a && B > b)
            break;
        x++;
      } int A = (int)(x * 0.08 * 10) / 10; A (int)(x * 0.08 * 10) / 10 (int)(x * 0.08 * 10) x * 0.08 * 10 x 0.08 10 10 int B = (int)(x * 0.1 * 10) / 10; B (int)(x * 0.1 * 10) / 10 (int)(x * 0.1 * 10) x * 0.1 * 10 x 0.1 10 10 if(A == a && B == b) {
            System.out.println(x);
            return;
        } A == a && B == b A == a A a B == b B b {
            System.out.println(x);
            return;
        } System.out.println(x) System.out.println System.out System System.out x return; if(A > a && B > b)
            break; A > a && B > b A > a A a B > b B b break; x++ x System.out.println(-1) System.out.println System.out System System.out -1 1 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 x = 1;
      while(true) {
          int A = (int)(x * 0.08 * 10) / 10;
          int B = (int)(x * 0.1 * 10) / 10;
        if(A == a && B == b) {
            System.out.println(x);
            return;
        }
        if(A > a && B > b)
            break;
        x++;
      }
      System.out.println(-1);
  }
} public class Main {

  public static void main(String[] args) { 
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int x = 1;
      while(true) {
          int A = (int)(x * 0.08 * 10) / 10;
          int B = (int)(x * 0.1 * 10) / 10;
        if(A == a && B == b) {
            System.out.println(x);
            return;
        }
        if(A > a && B > b)
            break;
        x++;
      }
      System.out.println(-1);
  }
} 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();
      int x = 1;
      while(true) {
          int A = (int)(x * 0.08 * 10) / 10;
          int B = (int)(x * 0.1 * 10) / 10;
        if(A == a && B == b) {
            System.out.println(x);
            return;
        }
        if(A > a && B > b)
            break;
        x++;
      }
      System.out.println(-1);
  }
}