import java.util.*;

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

        Scanner sc = new Scanner(System.in);

        // 8%時の税抜価格
        double a = sc.nextDouble() / 0.08;

        // 10%時の税抜価格
        double b = sc.nextDouble() / 0.1;

        // 税抜き価格 最小値判別
        if ((b <= a) && (a <= b + 9)) {

            System.out.println((int)Math.ceil(a));
        } else if ((a <= b) && (b <= a + 12)) {

            System.out.println((int)Math.ceil(b));
        } else {

            System.out.println("-1");
        }
    }
} import java.util.*; util.* java public class Main {
	public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 8%時の税抜価格
        double a = sc.nextDouble() / 0.08;

        // 10%時の税抜価格
        double b = sc.nextDouble() / 0.1;

        // 税抜き価格 最小値判別
        if ((b <= a) && (a <= b + 9)) {

            System.out.println((int)Math.ceil(a));
        } else if ((a <= b) && (b <= a + 12)) {

            System.out.println((int)Math.ceil(b));
        } else {

            System.out.println("-1");
        }
    }
} Main public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 8%時の税抜価格
        double a = sc.nextDouble() / 0.08;

        // 10%時の税抜価格
        double b = sc.nextDouble() / 0.1;

        // 税抜き価格 最小値判別
        if ((b <= a) && (a <= b + 9)) {

            System.out.println((int)Math.ceil(a));
        } else if ((a <= b) && (b <= a + 12)) {

            System.out.println((int)Math.ceil(b));
        } else {

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

        Scanner sc = new Scanner(System.in);

        // 8%時の税抜価格
        double a = sc.nextDouble() / 0.08;

        // 10%時の税抜価格
        double b = sc.nextDouble() / 0.1;

        // 税抜き価格 最小値判別
        if ((b <= a) && (a <= b + 9)) {

            System.out.println((int)Math.ceil(a));
        } else if ((a <= b) && (b <= a + 12)) {

            System.out.println((int)Math.ceil(b));
        } else {

            System.out.println("-1");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) double a = sc.nextDouble() / 0.08; a sc.nextDouble() / 0.08 sc.nextDouble() sc.nextDouble sc 0.08 double b = sc.nextDouble() / 0.1; b sc.nextDouble() / 0.1 sc.nextDouble() sc.nextDouble sc 0.1 if ((b <= a) && (a <= b + 9)) {

            System.out.println((int)Math.ceil(a));
        } else if ((a <= b) && (b <= a + 12)) {

            System.out.println((int)Math.ceil(b));
        } else {

            System.out.println("-1");
        } (b <= a) && (a <= b + 9) (b <= a) b a (a <= b + 9) a b + 9 b 9 {

            System.out.println((int)Math.ceil(a));
        } System.out.println((int)Math.ceil(a)) System.out.println System.out System System.out (int)Math.ceil(a) Math.ceil Math a if ((a <= b) && (b <= a + 12)) {

            System.out.println((int)Math.ceil(b));
        } else {

            System.out.println("-1");
        } (a <= b) && (b <= a + 12) (a <= b) a b (b <= a + 12) b a + 12 a 12 {

            System.out.println((int)Math.ceil(b));
        } System.out.println((int)Math.ceil(b)) System.out.println System.out System System.out (int)Math.ceil(b) Math.ceil Math b {

            System.out.println("-1");
        } System.out.println("-1") System.out.println System.out System System.out "-1" final String[] args args public class Main {
	public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 8%時の税抜価格
        double a = sc.nextDouble() / 0.08;

        // 10%時の税抜価格
        double b = sc.nextDouble() / 0.1;

        // 税抜き価格 最小値判別
        if ((b <= a) && (a <= b + 9)) {

            System.out.println((int)Math.ceil(a));
        } else if ((a <= b) && (b <= a + 12)) {

            System.out.println((int)Math.ceil(b));
        } else {

            System.out.println("-1");
        }
    }
} public class Main {
	public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 8%時の税抜価格
        double a = sc.nextDouble() / 0.08;

        // 10%時の税抜価格
        double b = sc.nextDouble() / 0.1;

        // 税抜き価格 最小値判別
        if ((b <= a) && (a <= b + 9)) {

            System.out.println((int)Math.ceil(a));
        } else if ((a <= b) && (b <= a + 12)) {

            System.out.println((int)Math.ceil(b));
        } else {

            System.out.println("-1");
        }
    }
} Main
import java.util.*;

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

        Scanner sc = new Scanner(System.in);

        // 8%時の税抜価格
        double a = sc.nextDouble() / 0.08;

        // 10%時の税抜価格
        double b = sc.nextDouble() / 0.1;

        // 税抜き価格 最小値判別
        if ((b <= a) && (a <= b + 9)) {

            System.out.println((int)Math.ceil(a));
        } else if ((a <= b) && (b <= a + 12)) {

            System.out.println((int)Math.ceil(b));
        } else {

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