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 = 1; i <= 1000; i++) {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        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 = 1; i <= 1000; i++) {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        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 = 1; i <= 1000; i++) {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        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 = 1; i <= 1000; i++) {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        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 = 1; i <= 1000; i++) {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        ans = i;
        break;
      }
    } int i = 1; int i = 1; i 1 i <= 1000 i 1000 i++ i++ i {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        ans = i;
        break;
      }
    } {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        ans = i;
        break;
      }
    } int C = (((int)8 * i) / (int)100); C (((int)8 * i) / (int)100) ((int)8 * i) (int)8 i (int)100 int D = (((int)10 * i) / (int)100); D (((int)10 * i) / (int)100) ((int)10 * i) (int)10 i (int)100 if((A == C) && (B == D)) {
        ans = i;
        break;
      } (A == C) && (B == D) (A == C) A C (B == D) B D {
        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 = 1; i <= 1000; i++) {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        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 = 1; i <= 1000; i++) {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        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 = 1; i <= 1000; i++) {
      int C = (((int)8 * i) / (int)100);
      int D = (((int)10 * i) / (int)100);
      if((A == C) && (B == D)) {
        ans = i;
        break;
      }
    }
    System.out.println(ans);
  }
}