import java.util.*;
import java.math.*;

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

        for (int i = B * 10; i < (B + 1) * 10; i++) {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    }
}	 import java.util.*; util.* java import java.math.*; math.* java public class Main{
	public static void main(String[] args) {
        Scanner itr = new Scanner(System.in);
        int A = itr.nextInt();
        int B = itr.nextInt();

        for (int i = B * 10; i < (B + 1) * 10; i++) {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    }
} Main public static void main(String[] args) {
        Scanner itr = new Scanner(System.in);
        int A = itr.nextInt();
        int B = itr.nextInt();

        for (int i = B * 10; i < (B + 1) * 10; i++) {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    } main {
        Scanner itr = new Scanner(System.in);
        int A = itr.nextInt();
        int B = itr.nextInt();

        for (int i = B * 10; i < (B + 1) * 10; i++) {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    } Scanner itr = new Scanner(System.in); itr new Scanner(System.in) int A = itr.nextInt(); A itr.nextInt() itr.nextInt itr int B = itr.nextInt(); B itr.nextInt() itr.nextInt itr for (int i = B * 10; i < (B + 1) * 10; i++) {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        } int i = B * 10; int i = B * 10; i B * 10 B 10 i < (B + 1) * 10 i (B + 1) * 10 (B + 1) B 1 10 i++ i++ i {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        } {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        } if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            } (i * 8 / 100) == A (i * 8 / 100) i * 8 i 8 100 A {
                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) {
        Scanner itr = new Scanner(System.in);
        int A = itr.nextInt();
        int B = itr.nextInt();

        for (int i = B * 10; i < (B + 1) * 10; i++) {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    }
} public class Main{
	public static void main(String[] args) {
        Scanner itr = new Scanner(System.in);
        int A = itr.nextInt();
        int B = itr.nextInt();

        for (int i = B * 10; i < (B + 1) * 10; i++) {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    }
} Main
import java.util.*;
import java.math.*;

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

        for (int i = B * 10; i < (B + 1) * 10; i++) {
            if ((i * 8 / 100) == A) {
                System.out.println(i);
                return;
            }
        }
        System.out.println(-1);
    }
}	