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 ans = -1;
    for(int i = (10 * b); i <= (10 * b) + 10; i++) {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == b)) {
        ans = i;
        break;
      }
    }
    System.out.println(ans);
  }
} 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 ans = -1;
    for(int i = (10 * b); i <= (10 * b) + 10; i++) {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == 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;
    for(int i = (10 * b); i <= (10 * b) + 10; i++) {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == 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;
    for(int i = (10 * b); i <= (10 * b) + 10; i++) {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == 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 for(int i = (10 * b); i <= (10 * b) + 10; i++) {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == b)) {
        ans = i;
        break;
      }
    } int i = (10 * b); int i = (10 * b); i (10 * b) 10 b i <= (10 * b) + 10 i (10 * b) + 10 (10 * b) 10 b 10 i++ i++ i {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == b)) {
        ans = i;
        break;
      }
    } {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == b)) {
        ans = i;
        break;
      }
    } int c1 = (i * 8) / 100; c1 (i * 8) / 100 (i * 8) i 8 100 int c2 = (i * 10) / 100; c2 (i * 10) / 100 (i * 10) i 10 100 if((c1 == a) && (c2 == b)) {
        ans = i;
        break;
      } (c1 == a) && (c2 == b) (c1 == a) c1 a (c2 == b) c2 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;
    for(int i = (10 * b); i <= (10 * b) + 10; i++) {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == 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;
    for(int i = (10 * b); i <= (10 * b) + 10; i++) {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == b)) {
        ans = i;
        break;
      }
    }
    System.out.println(ans);
  }
} 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 ans = -1;
    for(int i = (10 * b); i <= (10 * b) + 10; i++) {
      int c1 = (i * 8) / 100;
      int c2 = (i * 10) / 100;
      if((c1 == a) && (c2 == b)) {
        ans = i;
        break;
      }
    }
    System.out.println(ans);
  }
}