import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {

    public static void main(String[] args) throws Exception {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(is);

        List<String> mylist = new ArrayList<>();

        // 標準入力からの値を変数strinputに代入
        String strinput = reader.readLine();

        while (strinput != null) {

            mylist.add(strinput);
            strinput = reader.readLine();

        }

        String arr01[] = mylist.get(0).split(" ");

        int a = Integer.valueOf(arr01[0]);
        int b = Integer.valueOf(arr01[1]);

        final double zeiritu8 = 0.08;
        final double zeiritu10 = 0.1;

        for (int i = 1; i <= 1000; i++) {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == 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.util.ArrayList; ArrayList java.util import java.util.List; List java.util public class Main {

    public static void main(String[] args) throws Exception {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(is);

        List<String> mylist = new ArrayList<>();

        // 標準入力からの値を変数strinputに代入
        String strinput = reader.readLine();

        while (strinput != null) {

            mylist.add(strinput);
            strinput = reader.readLine();

        }

        String arr01[] = mylist.get(0).split(" ");

        int a = Integer.valueOf(arr01[0]);
        int b = Integer.valueOf(arr01[1]);

        final double zeiritu8 = 0.08;
        final double zeiritu10 = 0.1;

        for (int i = 1; i <= 1000; i++) {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            }

        }

        System.out.println(-1);

    }

} Main public static void main(String[] args) throws Exception {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(is);

        List<String> mylist = new ArrayList<>();

        // 標準入力からの値を変数strinputに代入
        String strinput = reader.readLine();

        while (strinput != null) {

            mylist.add(strinput);
            strinput = reader.readLine();

        }

        String arr01[] = mylist.get(0).split(" ");

        int a = Integer.valueOf(arr01[0]);
        int b = Integer.valueOf(arr01[1]);

        final double zeiritu8 = 0.08;
        final double zeiritu10 = 0.1;

        for (int i = 1; i <= 1000; i++) {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            }

        }

        System.out.println(-1);

    } main {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(is);

        List<String> mylist = new ArrayList<>();

        // 標準入力からの値を変数strinputに代入
        String strinput = reader.readLine();

        while (strinput != null) {

            mylist.add(strinput);
            strinput = reader.readLine();

        }

        String arr01[] = mylist.get(0).split(" ");

        int a = Integer.valueOf(arr01[0]);
        int b = Integer.valueOf(arr01[1]);

        final double zeiritu8 = 0.08;
        final double zeiritu10 = 0.1;

        for (int i = 1; i <= 1000; i++) {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            }

        }

        System.out.println(-1);

    } InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader reader = new BufferedReader(is); reader new BufferedReader(is) List<String> mylist = new ArrayList<>(); mylist new ArrayList<>() String strinput = reader.readLine(); strinput reader.readLine() reader.readLine reader while (strinput != null) {

            mylist.add(strinput);
            strinput = reader.readLine();

        } strinput != null strinput null {

            mylist.add(strinput);
            strinput = reader.readLine();

        } mylist.add(strinput) mylist.add mylist strinput strinput = reader.readLine() strinput reader.readLine() reader.readLine reader String arr01[] = mylist.get(0).split(" "); arr01 mylist.get(0).split(" ") mylist.get(0).split mylist.get(0) mylist.get mylist 0 " " int a = Integer.valueOf(arr01[0]); a Integer.valueOf(arr01[0]) Integer.valueOf Integer arr01[0] arr01 0 int b = Integer.valueOf(arr01[1]); b Integer.valueOf(arr01[1]) Integer.valueOf Integer arr01[1] arr01 1 final double zeiritu8 = 0.08; zeiritu8 0.08 final double zeiritu10 = 0.1; zeiritu10 0.1 for (int i = 1; i <= 1000; i++) {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            }

        } int i = 1; int i = 1; i 1 i <= 1000 i 1000 i++ i++ i {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            }

        } {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            }

        } double zei8 = i * zeiritu8; zei8 i * zeiritu8 i zeiritu8 double zei10 = i * zeiritu10; zei10 i * zeiritu10 i zeiritu10 if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            } (int) zei8 == a && (int) zei10 == b (int) zei8 == a (int) zei8 a (int) zei10 == b (int) zei10 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 Exception {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(is);

        List<String> mylist = new ArrayList<>();

        // 標準入力からの値を変数strinputに代入
        String strinput = reader.readLine();

        while (strinput != null) {

            mylist.add(strinput);
            strinput = reader.readLine();

        }

        String arr01[] = mylist.get(0).split(" ");

        int a = Integer.valueOf(arr01[0]);
        int b = Integer.valueOf(arr01[1]);

        final double zeiritu8 = 0.08;
        final double zeiritu10 = 0.1;

        for (int i = 1; i <= 1000; i++) {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            }

        }

        System.out.println(-1);

    }

} public class Main {

    public static void main(String[] args) throws Exception {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(is);

        List<String> mylist = new ArrayList<>();

        // 標準入力からの値を変数strinputに代入
        String strinput = reader.readLine();

        while (strinput != null) {

            mylist.add(strinput);
            strinput = reader.readLine();

        }

        String arr01[] = mylist.get(0).split(" ");

        int a = Integer.valueOf(arr01[0]);
        int b = Integer.valueOf(arr01[1]);

        final double zeiritu8 = 0.08;
        final double zeiritu10 = 0.1;

        for (int i = 1; i <= 1000; i++) {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            }

        }

        System.out.println(-1);

    }

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {

    public static void main(String[] args) throws Exception {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(is);

        List<String> mylist = new ArrayList<>();

        // 標準入力からの値を変数strinputに代入
        String strinput = reader.readLine();

        while (strinput != null) {

            mylist.add(strinput);
            strinput = reader.readLine();

        }

        String arr01[] = mylist.get(0).split(" ");

        int a = Integer.valueOf(arr01[0]);
        int b = Integer.valueOf(arr01[1]);

        final double zeiritu8 = 0.08;
        final double zeiritu10 = 0.1;

        for (int i = 1; i <= 1000; i++) {

            double zei8 = i * zeiritu8;
            double zei10 = i * zeiritu10;

            //            System.out.println(i + " " + (int) zei8 + " " + (int) zei10);

            if ((int) zei8 == a && (int) zei10 == b) {
                System.out.println(i);
                return;
            }

        }

        System.out.println(-1);

    }

}
