import java.util.*;
import java.lang.*;
import java.io.*;


public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer s = new StringTokenizer(br.readLine());
        int a = Integer.parseInt(s.nextToken());
        int b = Integer.parseInt(s.nextToken());
        int yen = b * 10;
        while (yen < (b+1) * 10 && (int)(yen * 0.08) != a)
            yen++;
        System.out.println(yen < (b+1)*10 ? yen : -1);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer s = new StringTokenizer(br.readLine());
        int a = Integer.parseInt(s.nextToken());
        int b = Integer.parseInt(s.nextToken());
        int yen = b * 10;
        while (yen < (b+1) * 10 && (int)(yen * 0.08) != a)
            yen++;
        System.out.println(yen < (b+1)*10 ? yen : -1);
    }
} Main public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer s = new StringTokenizer(br.readLine());
        int a = Integer.parseInt(s.nextToken());
        int b = Integer.parseInt(s.nextToken());
        int yen = b * 10;
        while (yen < (b+1) * 10 && (int)(yen * 0.08) != a)
            yen++;
        System.out.println(yen < (b+1)*10 ? yen : -1);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer s = new StringTokenizer(br.readLine());
        int a = Integer.parseInt(s.nextToken());
        int b = Integer.parseInt(s.nextToken());
        int yen = b * 10;
        while (yen < (b+1) * 10 && (int)(yen * 0.08) != a)
            yen++;
        System.out.println(yen < (b+1)*10 ? yen : -1);
    } BufferedReader br = new BufferedReader(new InputStreamReader((System.in))); br new BufferedReader(new InputStreamReader((System.in))) StringTokenizer s = new StringTokenizer(br.readLine()); s new StringTokenizer(br.readLine()) int a = Integer.parseInt(s.nextToken()); a Integer.parseInt(s.nextToken()) Integer.parseInt Integer s.nextToken() s.nextToken s int b = Integer.parseInt(s.nextToken()); b Integer.parseInt(s.nextToken()) Integer.parseInt Integer s.nextToken() s.nextToken s int yen = b * 10; yen b * 10 b 10 while (yen < (b+1) * 10 && (int)(yen * 0.08) != a)
            yen++; yen < (b+1) * 10 && (int)(yen * 0.08) != a yen < (b+1) * 10 yen (b+1) * 10 (b+1) b 1 10 (int)(yen * 0.08) != a (int)(yen * 0.08) yen 0.08 a yen++ yen System.out.println(yen < (b+1)*10 ? yen : -1) System.out.println System.out System System.out yen < (b+1)*10 ? yen : -1 yen < (b+1)*10 yen (b+1)*10 (b+1) b 1 10 yen -1 1 String[] args args public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer s = new StringTokenizer(br.readLine());
        int a = Integer.parseInt(s.nextToken());
        int b = Integer.parseInt(s.nextToken());
        int yen = b * 10;
        while (yen < (b+1) * 10 && (int)(yen * 0.08) != a)
            yen++;
        System.out.println(yen < (b+1)*10 ? yen : -1);
    }
} public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer s = new StringTokenizer(br.readLine());
        int a = Integer.parseInt(s.nextToken());
        int b = Integer.parseInt(s.nextToken());
        int yen = b * 10;
        while (yen < (b+1) * 10 && (int)(yen * 0.08) != a)
            yen++;
        System.out.println(yen < (b+1)*10 ? yen : -1);
    }
} Main
import java.util.*;
import java.lang.*;
import java.io.*;


public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer s = new StringTokenizer(br.readLine());
        int a = Integer.parseInt(s.nextToken());
        int b = Integer.parseInt(s.nextToken());
        int yen = b * 10;
        while (yen < (b+1) * 10 && (int)(yen * 0.08) != a)
            yen++;
        System.out.println(yen < (b+1)*10 ? yen : -1);
    }
}