import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    for(int i=0; i<=1000; i++) {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(-1);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    for(int i=0; i<=1000; i++) {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(-1);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    for(int i=0; i<=1000; i++) {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(-1);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    for(int i=0; i<=1000; i++) {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(-1);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int a = Integer.parseInt(str[0]); a Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int b = Integer.parseInt(str[1]); b Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 for(int i=0; i<=1000; i++) {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    } int i=0; int i=0; i 0 i<=1000 i 1000 i++ i++ i {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    } {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    } int eight = (int)(i*0.08); eight (int)(i*0.08) i 0.08 int ten = (int)(i*0.1); ten (int)(i*0.1) i 0.1 if(eight == a && ten == b) {
        System.out.println(i);
        return;
      } eight == a && ten == b eight == a eight a ten == b ten b {
        System.out.println(i);
        return;
      } System.out.println(i) System.out.println System.out System System.out i return; 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) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    for(int i=0; i<=1000; i++) {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(-1);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    for(int i=0; i<=1000; i++) {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(-1);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int a = Integer.parseInt(str[0]);
    int b = Integer.parseInt(str[1]);
    for(int i=0; i<=1000; i++) {
      int eight = (int)(i*0.08);
      int ten = (int)(i*0.1);
      if(eight == a && ten == b) {
        System.out.println(i);
        return;
      }
    }
    System.out.println(-1);
  }
}