import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		float ansA = (float)(a / 0.08f);
		float ansB = (float)(b / 0.1f);

		int aa = ansA % 1 == 0 ? (int)ansA : (int)ansA +1;
		int bb = ansB % 1 == 0 ? (int)ansB : (int)ansB +1;

		int c = Math.max(aa, bb);

		Boolean isOK = true;
		if((int)(c * 0.08f) != a){
			isOK = false;
		}
		if((int)(c * 0.1f) != b){
			isOK = false;
		}

		int ans = isOK ? c : -1;
		System.out.println(ans);

	}

}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz