import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    long A = scan.nextLong();
    long B = scan.nextLong();
    scan.close();

    if(12.5*A < 10*(B+1) && 10*B < 12.5*(A+1)) {
      System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A));
    }
    else {
      System.out.println(-1);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    long A = scan.nextLong();
    long B = scan.nextLong();
    scan.close();

    if(12.5*A < 10*(B+1) && 10*B < 12.5*(A+1)) {
      System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A));
    }
    else {
      System.out.println(-1);
    }
  }
} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    long A = scan.nextLong();
    long B = scan.nextLong();
    scan.close();

    if(12.5*A < 10*(B+1) && 10*B < 12.5*(A+1)) {
      System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A));
    }
    else {
      System.out.println(-1);
    }
  } main {
    Scanner scan = new Scanner(System.in);
    long A = scan.nextLong();
    long B = scan.nextLong();
    scan.close();

    if(12.5*A < 10*(B+1) && 10*B < 12.5*(A+1)) {
      System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A));
    }
    else {
      System.out.println(-1);
    }
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long A = scan.nextLong(); A scan.nextLong() scan.nextLong scan long B = scan.nextLong(); B scan.nextLong() scan.nextLong scan scan.close() scan.close scan if(12.5*A < 10*(B+1) && 10*B < 12.5*(A+1)) {
      System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A));
    }
    else {
      System.out.println(-1);
    } 12.5*A < 10*(B+1) && 10*B < 12.5*(A+1) 12.5*A < 10*(B+1) 12.5*A 12.5 A 10*(B+1) 10 (B+1) B 1 10*B < 12.5*(A+1) 10*B 10 B 12.5*(A+1) 12.5 (A+1) A 1 {
      System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A));
    } System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A)) System.out.println System.out System System.out String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A) String.format String "%.0f" 12.5*A < 10*B ? 10*B : 12.5*A 12.5*A < 10*B 12.5*A 12.5 A 10*B 10 B 10*B 10 B 12.5*A 12.5 A {
      System.out.println(-1);
    } 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) {
    Scanner scan = new Scanner(System.in);
    long A = scan.nextLong();
    long B = scan.nextLong();
    scan.close();

    if(12.5*A < 10*(B+1) && 10*B < 12.5*(A+1)) {
      System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A));
    }
    else {
      System.out.println(-1);
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    long A = scan.nextLong();
    long B = scan.nextLong();
    scan.close();

    if(12.5*A < 10*(B+1) && 10*B < 12.5*(A+1)) {
      System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A));
    }
    else {
      System.out.println(-1);
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    long A = scan.nextLong();
    long B = scan.nextLong();
    scan.close();

    if(12.5*A < 10*(B+1) && 10*B < 12.5*(A+1)) {
      System.out.println(String.format("%.0f", 12.5*A < 10*B ? 10*B : 12.5*A));
    }
    else {
      System.out.println(-1);
    }
  }
}