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