import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int answer = -1;
    for(int i = 0;i < 10000;i++){
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    }
    System.out.println(answer);
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int answer = -1;
    for(int i = 0;i < 10000;i++){
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    }
    System.out.println(answer);
  }
} Main public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int answer = -1;
    for(int i = 0;i < 10000;i++){
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    }
    System.out.println(answer);
  } main {
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int answer = -1;
    for(int i = 0;i < 10000;i++){
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    }
    System.out.println(answer);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner int answer = -1; answer -1 1 for(int i = 0;i < 10000;i++){
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    } int i = 0; int i = 0; i 0 i < 10000 i 10000 i++ i++ i {
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    } {
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    } int x1 = (int)(i * 0.08); x1 (int)(i * 0.08) i 0.08 int x2 = (int)(i * 0.1); x2 (int)(i * 0.1) i 0.1 if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      } x1 == A x1 A {
        if(x2 == B){
          answer = i;
          break;
        }
      } if(x2 == B){
          answer = i;
          break;
        } x2 == B x2 B {
          answer = i;
          break;
        } answer = i answer i break; System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int answer = -1;
    for(int i = 0;i < 10000;i++){
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    }
    System.out.println(answer);
  }
} public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int answer = -1;
    for(int i = 0;i < 10000;i++){
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    }
    System.out.println(answer);
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int A = scanner.nextInt();
    int B = scanner.nextInt();
    int answer = -1;
    for(int i = 0;i < 10000;i++){
      int x1 = (int)(i * 0.08);
      int x2 = (int)(i * 0.1);
      if(x1 == A){
        if(x2 == B){
          answer = i;
          break;
        }
      }
    }
    System.out.println(answer);
  }
}