import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int oriA = (int)Math.ceil(A/0.08);
        int oriB = (int)Math.ceil(B/0.1);
        int min = Math.min(oriA, oriB);
        int max = Math.max(oriA, oriB);
        for(int i = min ; i <= max; i++){
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        }
        os.println(-1);
    }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.PriorityQueue; PriorityQueue java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int oriA = (int)Math.ceil(A/0.08);
        int oriB = (int)Math.ceil(B/0.1);
        int min = Math.min(oriA, oriB);
        int max = Math.max(oriA, oriB);
        for(int i = min ; i <= max; i++){
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        }
        os.println(-1);
    }
} Main public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    } main {
        solve(System.in, System.out);
    } solve(System.in, System.out) solve System.in System System.in System.out System System.out String[] args args static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int oriA = (int)Math.ceil(A/0.08);
        int oriB = (int)Math.ceil(B/0.1);
        int min = Math.min(oriA, oriB);
        int max = Math.max(oriA, oriB);
        for(int i = min ; i <= max; i++){
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        }
        os.println(-1);
    } solve {
        // Your code here!
        Scanner scan = new Scanner(is);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int oriA = (int)Math.ceil(A/0.08);
        int oriB = (int)Math.ceil(B/0.1);
        int min = Math.min(oriA, oriB);
        int max = Math.max(oriA, oriB);
        for(int i = min ; i <= max; i++){
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        }
        os.println(-1);
    } Scanner scan = new Scanner(is); scan new Scanner(is) int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan int B = scan.nextInt(); B scan.nextInt() scan.nextInt scan int oriA = (int)Math.ceil(A/0.08); oriA (int)Math.ceil(A/0.08) Math.ceil Math A/0.08 A 0.08 int oriB = (int)Math.ceil(B/0.1); oriB (int)Math.ceil(B/0.1) Math.ceil Math B/0.1 B 0.1 int min = Math.min(oriA, oriB); min Math.min(oriA, oriB) Math.min Math oriA oriB int max = Math.max(oriA, oriB); max Math.max(oriA, oriB) Math.max Math oriA oriB for(int i = min ; i <= max; i++){
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        } int i = min ; int i = min ; i min i <= max i max i++ i++ i {
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        } {
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        } if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            } (int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B (int)Math.floor(i*0.08) == A (int)Math.floor(i*0.08) Math.floor Math i*0.08 i 0.08 A (int)Math.floor(i*0.1) == B (int)Math.floor(i*0.1) Math.floor Math i*0.1 i 0.1 B {
                os.println(i);
                return;
            } os.println(i) os.println os i return; os.println(-1) os.println os -1 1 InputStream is is PrintStream os os public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int oriA = (int)Math.ceil(A/0.08);
        int oriB = (int)Math.ceil(B/0.1);
        int min = Math.min(oriA, oriB);
        int max = Math.max(oriA, oriB);
        for(int i = min ; i <= max; i++){
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        }
        os.println(-1);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int oriA = (int)Math.ceil(A/0.08);
        int oriB = (int)Math.ceil(B/0.1);
        int min = Math.min(oriA, oriB);
        int max = Math.max(oriA, oriB);
        for(int i = min ; i <= max; i++){
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        }
        os.println(-1);
    }
} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int oriA = (int)Math.ceil(A/0.08);
        int oriB = (int)Math.ceil(B/0.1);
        int min = Math.min(oriA, oriB);
        int max = Math.max(oriA, oriB);
        for(int i = min ; i <= max; i++){
            if((int)Math.floor(i*0.08) == A && (int)Math.floor(i*0.1) == B) {
                os.println(i);
                return;
            }
        }
        os.println(-1);
    }
}