https://www.acmicpc.net/problem/4299
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int a=s.nextInt();
int b=s.nextInt();
if((a+b)%2==1||a<b) System.out.print(-1);
else{
int n=(a+b)/2;
int m=a-n;
System.out.format("%d %d",n,m);
}
}
}