import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int Aval, Bval;

        // int loop = (int) Math.min(A / 0.08, B / 0.1);
        // System.out.println(loop);
        for (int i = 1; i <= 1000; i++) {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
        sc.close();
    }
} import java.util.Scanner; Scanner 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 Aval, Bval;

        // int loop = (int) Math.min(A / 0.08, B / 0.1);
        // System.out.println(loop);
        for (int i = 1; i <= 1000; i++) {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int Aval, Bval;

        // int loop = (int) Math.min(A / 0.08, B / 0.1);
        // System.out.println(loop);
        for (int i = 1; i <= 1000; i++) {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int Aval, Bval;

        // int loop = (int) Math.min(A / 0.08, B / 0.1);
        // System.out.println(loop);
        for (int i = 1; i <= 1000; i++) {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
        sc.close();
    } 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 Aval Aval Bval; Bval for (int i = 1; i <= 1000; i++) {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        } int i = 1; int i = 1; i 1 i <= 1000 i 1000 i++ i++ i {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        } {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        } Aval = (int) (i * 0.08) Aval (int) (i * 0.08) i 0.08 Bval = (int) (i * 0.1) Bval (int) (i * 0.1) i 0.1 if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            } A == Aval && B == Bval A == Aval A Aval B == Bval B Bval {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            } System.out.println(i) System.out.println System.out System System.out i System.exit(0) System.exit System 0 System.out.println(-1) System.out.println System.out System System.out -1 1 sc.close() sc.close sc 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 Aval, Bval;

        // int loop = (int) Math.min(A / 0.08, B / 0.1);
        // System.out.println(loop);
        for (int i = 1; i <= 1000; i++) {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int Aval, Bval;

        // int loop = (int) Math.min(A / 0.08, B / 0.1);
        // System.out.println(loop);
        for (int i = 1; i <= 1000; i++) {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int Aval, Bval;

        // int loop = (int) Math.min(A / 0.08, B / 0.1);
        // System.out.println(loop);
        for (int i = 1; i <= 1000; i++) {
            Aval = (int) (i * 0.08);
            Bval = (int) (i * 0.1);
            //System.out.println(Aval+" "+Bval);
            if (A == Aval && B == Bval) {
                // System.out.println("i*0.08 = "+(int)(i * 0.08)+"i*0.1 = "+(int)(i * 0.1));
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
        sc.close();
    }
}