import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int A = s.nextInt();
        int B = s.nextInt();
        double A_min = A;
        double A_max = A + 0.999;
        double B_min = B;
        double B_max = B + 0.999;
        int x_min, x_max;
        int y_min, y_max;
        int ans;
        x_min = (int) Math.ceil(A_min / 0.08);
        x_max = (int) Math.floor(A_max / 0.08);
        y_min = (int) Math.ceil(B_min / 0.1);
        y_max = (int) Math.floor(B_max / 0.1);

        if (x_max < y_min || x_min > y_max) {
            ans = -1;
        } else {
            if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            }
        }

        System.out.println(ans);
        s.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int A = s.nextInt();
        int B = s.nextInt();
        double A_min = A;
        double A_max = A + 0.999;
        double B_min = B;
        double B_max = B + 0.999;
        int x_min, x_max;
        int y_min, y_max;
        int ans;
        x_min = (int) Math.ceil(A_min / 0.08);
        x_max = (int) Math.floor(A_max / 0.08);
        y_min = (int) Math.ceil(B_min / 0.1);
        y_max = (int) Math.floor(B_max / 0.1);

        if (x_max < y_min || x_min > y_max) {
            ans = -1;
        } else {
            if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            }
        }

        System.out.println(ans);
        s.close();
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int A = s.nextInt();
        int B = s.nextInt();
        double A_min = A;
        double A_max = A + 0.999;
        double B_min = B;
        double B_max = B + 0.999;
        int x_min, x_max;
        int y_min, y_max;
        int ans;
        x_min = (int) Math.ceil(A_min / 0.08);
        x_max = (int) Math.floor(A_max / 0.08);
        y_min = (int) Math.ceil(B_min / 0.1);
        y_max = (int) Math.floor(B_max / 0.1);

        if (x_max < y_min || x_min > y_max) {
            ans = -1;
        } else {
            if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            }
        }

        System.out.println(ans);
        s.close();
    } main {
        Scanner s = new Scanner(System.in);
        int A = s.nextInt();
        int B = s.nextInt();
        double A_min = A;
        double A_max = A + 0.999;
        double B_min = B;
        double B_max = B + 0.999;
        int x_min, x_max;
        int y_min, y_max;
        int ans;
        x_min = (int) Math.ceil(A_min / 0.08);
        x_max = (int) Math.floor(A_max / 0.08);
        y_min = (int) Math.ceil(B_min / 0.1);
        y_max = (int) Math.floor(B_max / 0.1);

        if (x_max < y_min || x_min > y_max) {
            ans = -1;
        } else {
            if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            }
        }

        System.out.println(ans);
        s.close();
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int A = s.nextInt(); A s.nextInt() s.nextInt s int B = s.nextInt(); B s.nextInt() s.nextInt s double A_min = A; A_min A double A_max = A + 0.999; A_max A + 0.999 A 0.999 double B_min = B; B_min B double B_max = B + 0.999; B_max B + 0.999 B 0.999 int x_min x_min x_max; x_max int y_min y_min y_max; y_max int ans; ans x_min = (int) Math.ceil(A_min / 0.08) x_min (int) Math.ceil(A_min / 0.08) Math.ceil Math A_min / 0.08 A_min 0.08 x_max = (int) Math.floor(A_max / 0.08) x_max (int) Math.floor(A_max / 0.08) Math.floor Math A_max / 0.08 A_max 0.08 y_min = (int) Math.ceil(B_min / 0.1) y_min (int) Math.ceil(B_min / 0.1) Math.ceil Math B_min / 0.1 B_min 0.1 y_max = (int) Math.floor(B_max / 0.1) y_max (int) Math.floor(B_max / 0.1) Math.floor Math B_max / 0.1 B_max 0.1 if (x_max < y_min || x_min > y_max) {
            ans = -1;
        } else {
            if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            }
        } x_max < y_min || x_min > y_max x_max < y_min x_max y_min x_min > y_max x_min y_max {
            ans = -1;
        } ans = -1 ans -1 1 {
            if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            }
        } if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            } x_min > y_min x_min y_min {
                ans = x_min;
            } ans = x_min ans x_min {
                ans = y_min;
            } ans = y_min ans y_min System.out.println(ans) System.out.println System.out System System.out ans s.close() s.close s String[] args args public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int A = s.nextInt();
        int B = s.nextInt();
        double A_min = A;
        double A_max = A + 0.999;
        double B_min = B;
        double B_max = B + 0.999;
        int x_min, x_max;
        int y_min, y_max;
        int ans;
        x_min = (int) Math.ceil(A_min / 0.08);
        x_max = (int) Math.floor(A_max / 0.08);
        y_min = (int) Math.ceil(B_min / 0.1);
        y_max = (int) Math.floor(B_max / 0.1);

        if (x_max < y_min || x_min > y_max) {
            ans = -1;
        } else {
            if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            }
        }

        System.out.println(ans);
        s.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int A = s.nextInt();
        int B = s.nextInt();
        double A_min = A;
        double A_max = A + 0.999;
        double B_min = B;
        double B_max = B + 0.999;
        int x_min, x_max;
        int y_min, y_max;
        int ans;
        x_min = (int) Math.ceil(A_min / 0.08);
        x_max = (int) Math.floor(A_max / 0.08);
        y_min = (int) Math.ceil(B_min / 0.1);
        y_max = (int) Math.floor(B_max / 0.1);

        if (x_max < y_min || x_min > y_max) {
            ans = -1;
        } else {
            if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            }
        }

        System.out.println(ans);
        s.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int A = s.nextInt();
        int B = s.nextInt();
        double A_min = A;
        double A_max = A + 0.999;
        double B_min = B;
        double B_max = B + 0.999;
        int x_min, x_max;
        int y_min, y_max;
        int ans;
        x_min = (int) Math.ceil(A_min / 0.08);
        x_max = (int) Math.floor(A_max / 0.08);
        y_min = (int) Math.ceil(B_min / 0.1);
        y_max = (int) Math.floor(B_max / 0.1);

        if (x_max < y_min || x_min > y_max) {
            ans = -1;
        } else {
            if (x_min > y_min) {
                ans = x_min;
            } else {
                ans = y_min;
            }
        }

        System.out.println(ans);
        s.close();
    }
}