https://www.acmicpc.net/problem/4299
using static System.Console;
class Program
{
static void Main() {
string[] s=ReadLine().Split(" ");
int a=int.Parse(s[0]);
int b=int.Parse(s[1]);
if((a+b)%2==1||a<b) Write(-1);
else{
int n=(a+b)/2;
int m=a-n;
Write("{0} {1}",n,m);
}
}
}