
import 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());

        Integer a = 0;
        Integer start = 0;
        for(;;) {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        }

        for (int i = start; i < a; i++) {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
} import java.util.*; util.* java 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());

        Integer a = 0;
        Integer start = 0;
        for(;;) {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        }

        for (int i = start; i < a; i++) {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
} 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());

        Integer a = 0;
        Integer start = 0;
        for(;;) {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        }

        for (int i = start; i < a; i++) {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    } main {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer A = Integer.parseInt(scanner.next());
        Integer B = Integer.parseInt(scanner.next());

        Integer a = 0;
        Integer start = 0;
        for(;;) {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        }

        for (int i = start; i < a; i++) {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    } 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 Integer a = 0; a 0 Integer start = 0; start 0 for(;;) {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        } ; {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        } {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        } double tax1 = Math.floor(a * 0.08); tax1 Math.floor(a * 0.08) Math.floor Math a * 0.08 a 0.08 if((int)tax1 <= A-1) start = a + 1; (int)tax1 <= A-1 (int)tax1 A-1 A 1 start = a + 1 start a + 1 a 1 if(A < tax1) break; A < tax1 A tax1 break; a++ a for (int i = start; i < a; i++) {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        } int i = start; int i = start; i start i < a i a i++ i++ i {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        } {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        } double tax2 = Math.floor(i * 0.1); tax2 Math.floor(i * 0.1) Math.floor Math i * 0.1 i 0.1 if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            } (int)tax2 == B (int)tax2 B {
                System.out.println(i);
                System.exit(0);
            } System.out.println(i) System.out.println System.out System System.out i System.exit(0) System.exit System 0 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 scanner = new Scanner(System.in);
        Integer A = Integer.parseInt(scanner.next());
        Integer B = Integer.parseInt(scanner.next());

        Integer a = 0;
        Integer start = 0;
        for(;;) {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        }

        for (int i = start; i < a; i++) {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
} 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());

        Integer a = 0;
        Integer start = 0;
        for(;;) {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        }

        for (int i = start; i < a; i++) {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
} Main

import 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());

        Integer a = 0;
        Integer start = 0;
        for(;;) {
            double tax1 = Math.floor(a * 0.08);
            if((int)tax1 <= A-1) start = a + 1;
            if(A < tax1) break;
            a++;
        }

        for (int i = start; i < a; i++) {
            double tax2 = Math.floor(i * 0.1);
            if((int)tax2 == B) {
                System.out.println(i);
                System.exit(0);
            }
        }
        System.out.println(-1);
    }
}