import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        // 入力データの取得
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        scanner.close();

        //データの加工
        String[] editedInputData = inputData.split(" ");
        int smallerTax = Integer.parseInt(editedInputData[0]);
        int biggerTax = Integer.parseInt(editedInputData[1]);

        // 税抜き価格の算出
        double taxA = 0.08;
        double taxB = 0.10;
        int[][] taxAAndB = new int[1000][2];
        for (int index = 0; index < taxAAndB.length; index++) {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        }

        // 判定
        for (int index = 0; index < taxAAndB.length; index++) {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        }

        System.out.println("-1");
        
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

        // 入力データの取得
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        scanner.close();

        //データの加工
        String[] editedInputData = inputData.split(" ");
        int smallerTax = Integer.parseInt(editedInputData[0]);
        int biggerTax = Integer.parseInt(editedInputData[1]);

        // 税抜き価格の算出
        double taxA = 0.08;
        double taxB = 0.10;
        int[][] taxAAndB = new int[1000][2];
        for (int index = 0; index < taxAAndB.length; index++) {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        }

        // 判定
        for (int index = 0; index < taxAAndB.length; index++) {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        }

        System.out.println("-1");
        
    }

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

        // 入力データの取得
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        scanner.close();

        //データの加工
        String[] editedInputData = inputData.split(" ");
        int smallerTax = Integer.parseInt(editedInputData[0]);
        int biggerTax = Integer.parseInt(editedInputData[1]);

        // 税抜き価格の算出
        double taxA = 0.08;
        double taxB = 0.10;
        int[][] taxAAndB = new int[1000][2];
        for (int index = 0; index < taxAAndB.length; index++) {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        }

        // 判定
        for (int index = 0; index < taxAAndB.length; index++) {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        }

        System.out.println("-1");
        
    } main {

        // 入力データの取得
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        scanner.close();

        //データの加工
        String[] editedInputData = inputData.split(" ");
        int smallerTax = Integer.parseInt(editedInputData[0]);
        int biggerTax = Integer.parseInt(editedInputData[1]);

        // 税抜き価格の算出
        double taxA = 0.08;
        double taxB = 0.10;
        int[][] taxAAndB = new int[1000][2];
        for (int index = 0; index < taxAAndB.length; index++) {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        }

        // 判定
        for (int index = 0; index < taxAAndB.length; index++) {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        }

        System.out.println("-1");
        
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String inputData = scanner.nextLine(); inputData scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner String[] editedInputData = inputData.split(" "); editedInputData inputData.split(" ") inputData.split inputData " " int smallerTax = Integer.parseInt(editedInputData[0]); smallerTax Integer.parseInt(editedInputData[0]) Integer.parseInt Integer editedInputData[0] editedInputData 0 int biggerTax = Integer.parseInt(editedInputData[1]); biggerTax Integer.parseInt(editedInputData[1]) Integer.parseInt Integer editedInputData[1] editedInputData 1 double taxA = 0.08; taxA 0.08 double taxB = 0.10; taxB 0.10 int[][] taxAAndB = new int[1000][2]; taxAAndB new int[1000][2] 1000 2 for (int index = 0; index < taxAAndB.length; index++) {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        } int index = 0; int index = 0; index 0 index < taxAAndB.length index taxAAndB.length taxAAndB taxAAndB.length index++ index++ index {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        } {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        } taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA) taxAAndB[index][0] taxAAndB[index] taxAAndB index 0 (int) Math.floor((index + 1) * taxA) Math.floor Math (index + 1) * taxA (index + 1) index 1 taxA taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB) taxAAndB[index][1] taxAAndB[index] taxAAndB index 1 (int) Math.floor((index + 1) * taxB) Math.floor Math (index + 1) * taxB (index + 1) index 1 taxB for (int index = 0; index < taxAAndB.length; index++) {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        } int index = 0; int index = 0; index 0 index < taxAAndB.length index taxAAndB.length taxAAndB taxAAndB.length index++ index++ index {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        } {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        } if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            } taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax taxAAndB[index][0] == smallerTax taxAAndB[index][0] taxAAndB[index] taxAAndB index 0 smallerTax taxAAndB[index][1] == biggerTax taxAAndB[index][1] taxAAndB[index] taxAAndB index 1 biggerTax {
                System.out.println(index + 1);
                return;
            } System.out.println(index + 1) System.out.println System.out System System.out index + 1 index 1 return; System.out.println("-1") System.out.println System.out System System.out "-1" String[] args args public class Main {

    public static void main(String[] args) {

        // 入力データの取得
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        scanner.close();

        //データの加工
        String[] editedInputData = inputData.split(" ");
        int smallerTax = Integer.parseInt(editedInputData[0]);
        int biggerTax = Integer.parseInt(editedInputData[1]);

        // 税抜き価格の算出
        double taxA = 0.08;
        double taxB = 0.10;
        int[][] taxAAndB = new int[1000][2];
        for (int index = 0; index < taxAAndB.length; index++) {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        }

        // 判定
        for (int index = 0; index < taxAAndB.length; index++) {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        }

        System.out.println("-1");
        
    }

} public class Main {

    public static void main(String[] args) {

        // 入力データの取得
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        scanner.close();

        //データの加工
        String[] editedInputData = inputData.split(" ");
        int smallerTax = Integer.parseInt(editedInputData[0]);
        int biggerTax = Integer.parseInt(editedInputData[1]);

        // 税抜き価格の算出
        double taxA = 0.08;
        double taxB = 0.10;
        int[][] taxAAndB = new int[1000][2];
        for (int index = 0; index < taxAAndB.length; index++) {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        }

        // 判定
        for (int index = 0; index < taxAAndB.length; index++) {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        }

        System.out.println("-1");
        
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        // 入力データの取得
        Scanner scanner = new Scanner(System.in);
        String inputData = scanner.nextLine();
        scanner.close();

        //データの加工
        String[] editedInputData = inputData.split(" ");
        int smallerTax = Integer.parseInt(editedInputData[0]);
        int biggerTax = Integer.parseInt(editedInputData[1]);

        // 税抜き価格の算出
        double taxA = 0.08;
        double taxB = 0.10;
        int[][] taxAAndB = new int[1000][2];
        for (int index = 0; index < taxAAndB.length; index++) {
            taxAAndB[index][0] = (int) Math.floor((index + 1) * taxA);
            taxAAndB[index][1] = (int) Math.floor((index + 1) * taxB);
        }

        // 判定
        for (int index = 0; index < taxAAndB.length; index++) {
            if (taxAAndB[index][0] == smallerTax && taxAAndB[index][1] == biggerTax) {
                System.out.println(index + 1);
                return;
            }
        }

        System.out.println("-1");
        
    }

}