import java.util.*;
import java.lang.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);

        Integer a = Integer.parseInt(scanner.next());
        Integer b = Integer.parseInt(scanner.next());

        Long ar = 0L;
        Long br = 0L;
        boolean a_result = true;

        Long count = 10L;
        Long end = 0L;
        while(true) {
            Integer tmp_b = (int) Math.floor(count * 0.1);
            if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            }
            count += 10;
        }

        if((int) Math.floor(count * 0.08) > a ) {
            System.out.println(-1);
            System.exit(0);
        }

        for(Long i = count; i < end; i++) {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        }

        System.out.println(ar);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.util.stream.*; stream.* java.util public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);

        Integer a = Integer.parseInt(scanner.next());
        Integer b = Integer.parseInt(scanner.next());

        Long ar = 0L;
        Long br = 0L;
        boolean a_result = true;

        Long count = 10L;
        Long end = 0L;
        while(true) {
            Integer tmp_b = (int) Math.floor(count * 0.1);
            if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            }
            count += 10;
        }

        if((int) Math.floor(count * 0.08) > a ) {
            System.out.println(-1);
            System.exit(0);
        }

        for(Long i = count; i < end; i++) {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        }

        System.out.println(ar);
    }
} Main public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);

        Integer a = Integer.parseInt(scanner.next());
        Integer b = Integer.parseInt(scanner.next());

        Long ar = 0L;
        Long br = 0L;
        boolean a_result = true;

        Long count = 10L;
        Long end = 0L;
        while(true) {
            Integer tmp_b = (int) Math.floor(count * 0.1);
            if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            }
            count += 10;
        }

        if((int) Math.floor(count * 0.08) > a ) {
            System.out.println(-1);
            System.exit(0);
        }

        for(Long i = count; i < end; i++) {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        }

        System.out.println(ar);
    } main {
        //コード
        Scanner scanner = new Scanner(System.in);

        Integer a = Integer.parseInt(scanner.next());
        Integer b = Integer.parseInt(scanner.next());

        Long ar = 0L;
        Long br = 0L;
        boolean a_result = true;

        Long count = 10L;
        Long end = 0L;
        while(true) {
            Integer tmp_b = (int) Math.floor(count * 0.1);
            if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            }
            count += 10;
        }

        if((int) Math.floor(count * 0.08) > a ) {
            System.out.println(-1);
            System.exit(0);
        }

        for(Long i = count; i < end; i++) {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        }

        System.out.println(ar);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) Integer a = Integer.parseInt(scanner.next()); a Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Integer b = Integer.parseInt(scanner.next()); b Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner Long ar = 0L; ar 0L Long br = 0L; br 0L boolean a_result = true; a_result true Long count = 10L; count 10L Long end = 0L; end 0L while(true) {
            Integer tmp_b = (int) Math.floor(count * 0.1);
            if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            }
            count += 10;
        } true {
            Integer tmp_b = (int) Math.floor(count * 0.1);
            if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            }
            count += 10;
        } Integer tmp_b = (int) Math.floor(count * 0.1); tmp_b (int) Math.floor(count * 0.1) Math.floor Math count * 0.1 count 0.1 if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            } tmp_b == b tmp_b b {
                br = count;
                end = count + 10;
                break;
            } br = count br count end = count + 10 end count + 10 count 10 break; count += 10 count 10 if((int) Math.floor(count * 0.08) > a ) {
            System.out.println(-1);
            System.exit(0);
        } (int) Math.floor(count * 0.08) > a (int) Math.floor(count * 0.08) Math.floor Math count * 0.08 count 0.08 a {
            System.out.println(-1);
            System.exit(0);
        } System.out.println(-1) System.out.println System.out System System.out -1 1 System.exit(0) System.exit System 0 for(Long i = count; i < end; i++) {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        } Long i = count; Long i = count; i count i < end i end i++ i++ i {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        } {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        } Integer tmp_a = (int) Math.floor(i* 0.08); tmp_a (int) Math.floor(i* 0.08) Math.floor Math i* 0.08 i 0.08 if(tmp_a == a){
                ar = i;
                break;
            } tmp_a == a tmp_a a {
                ar = i;
                break;
            } ar = i ar i break; if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            } i == end -1 i end -1 end 1 {
                System.out.println(-1);
                System.exit(0);
            } System.out.println(-1) System.out.println System.out System System.out -1 1 System.exit(0) System.exit System 0 System.out.println(ar) System.out.println System.out System System.out ar String[] args args public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);

        Integer a = Integer.parseInt(scanner.next());
        Integer b = Integer.parseInt(scanner.next());

        Long ar = 0L;
        Long br = 0L;
        boolean a_result = true;

        Long count = 10L;
        Long end = 0L;
        while(true) {
            Integer tmp_b = (int) Math.floor(count * 0.1);
            if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            }
            count += 10;
        }

        if((int) Math.floor(count * 0.08) > a ) {
            System.out.println(-1);
            System.exit(0);
        }

        for(Long i = count; i < end; i++) {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        }

        System.out.println(ar);
    }
} public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);

        Integer a = Integer.parseInt(scanner.next());
        Integer b = Integer.parseInt(scanner.next());

        Long ar = 0L;
        Long br = 0L;
        boolean a_result = true;

        Long count = 10L;
        Long end = 0L;
        while(true) {
            Integer tmp_b = (int) Math.floor(count * 0.1);
            if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            }
            count += 10;
        }

        if((int) Math.floor(count * 0.08) > a ) {
            System.out.println(-1);
            System.exit(0);
        }

        for(Long i = count; i < end; i++) {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        }

        System.out.println(ar);
    }
} Main
import java.util.*;
import java.lang.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);

        Integer a = Integer.parseInt(scanner.next());
        Integer b = Integer.parseInt(scanner.next());

        Long ar = 0L;
        Long br = 0L;
        boolean a_result = true;

        Long count = 10L;
        Long end = 0L;
        while(true) {
            Integer tmp_b = (int) Math.floor(count * 0.1);
            if(tmp_b == b) {
                br = count;
                end = count + 10;
                break;
            }
            count += 10;
        }

        if((int) Math.floor(count * 0.08) > a ) {
            System.out.println(-1);
            System.exit(0);
        }

        for(Long i = count; i < end; i++) {
            Integer tmp_a = (int) Math.floor(i* 0.08);
            if(tmp_a == a){
                ar = i;
                break;
            }

            if (i == end -1) {
                System.out.println(-1);
                System.exit(0);
            }
        }

        System.out.println(ar);
    }
}
