import java.util.*;
// import java.util.stream.*;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    System.out.println(main.solve());
  }

  int a;
  int b;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = sc.nextInt();
      b = sc.nextInt();
    } finally {
      sc.close();
    }
  }

  int solve() {
    for (int i = 1; i <= 1000; i++) {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    }
    return -1;
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    System.out.println(main.solve());
  }

  int a;
  int b;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = sc.nextInt();
      b = sc.nextInt();
    } finally {
      sc.close();
    }
  }

  int solve() {
    for (int i = 1; i <= 1000; i++) {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    }
    return -1;
  }
} Main int a; a int b; b public static void main(String[] args) {
    Main main = new Main();
    System.out.println(main.solve());
  } main {
    Main main = new Main();
    System.out.println(main.solve());
  } Main main = new Main(); main new Main() System.out.println(main.solve()) System.out.println System.out System System.out main.solve() main.solve main String[] args args public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = sc.nextInt();
      b = sc.nextInt();
    } finally {
      sc.close();
    }
  } Main {
    Scanner sc = new Scanner(System.in);
    try {
      a = sc.nextInt();
      b = sc.nextInt();
    } finally {
      sc.close();
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
      a = sc.nextInt();
      b = sc.nextInt();
    } finally {
      sc.close();
    } {
      sc.close();
    } sc.close() sc.close sc {
      a = sc.nextInt();
      b = sc.nextInt();
    } a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc int solve() {
    for (int i = 1; i <= 1000; i++) {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    }
    return -1;
  } solve {
    for (int i = 1; i <= 1000; i++) {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    }
    return -1;
  } for (int i = 1; i <= 1000; i++) {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    } int i = 1; int i = 1; i 1 i <= 1000 i 1000 i++ i++ i {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    } {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    } int x = i * 8 / 100; x i * 8 / 100 i * 8 i 8 100 int y = i * 10 / 100; y i * 10 / 100 i * 10 i 10 100 if (x == a && y == b) return i; x == a && y == b x == a x a y == b y b return i; i return -1; -1 1 public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    System.out.println(main.solve());
  }

  int a;
  int b;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = sc.nextInt();
      b = sc.nextInt();
    } finally {
      sc.close();
    }
  }

  int solve() {
    for (int i = 1; i <= 1000; i++) {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    }
    return -1;
  }
} public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    System.out.println(main.solve());
  }

  int a;
  int b;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = sc.nextInt();
      b = sc.nextInt();
    } finally {
      sc.close();
    }
  }

  int solve() {
    for (int i = 1; i <= 1000; i++) {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    }
    return -1;
  }
} Main
import java.util.*;
// import java.util.stream.*;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    System.out.println(main.solve());
  }

  int a;
  int b;

  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      a = sc.nextInt();
      b = sc.nextInt();
    } finally {
      sc.close();
    }
  }

  int solve() {
    for (int i = 1; i <= 1000; i++) {
      int x = i * 8 / 100;
      int y = i * 10 / 100;
      if (x == a && y == b) return i;
    }
    return -1;
  }
}
