#include <iostream>
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
ll n,m;
cin>>n>>m;
cout<<(n+m)/2<<" "<<(n-m)/2;

}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll MOD = 1e9+7;
const int INF=1LL<<30;
const string YYY="YES";
const string yyy="Yes";
const string NNN="NO";
const string nnn="No";
template<class T>void chmin(T& a,T b){
  if(a>b){
    a=b;
  }
}
template<class T>void chmax(T& a,T b){
  if(a>b){
    a=b;
  }
}
string rot13(string S){
  int a=S.size();
  for(int i=0;i<a;i++){
   if(S[i]=='a'){S[i]='n';continue;}
    if(S[i]=='b'){S[i]='o';continue;}
    if(S[i]=='c'){S[i]='p'; continue;}
    if(S[i]=='d'){S[i]='q'; continue;}
    if(S[i]=='e'){S[i]='r'; continue;}
    if(S[i]=='f'){S[i]='s'; continue;}
    if(S[i]=='g'){S[i]='t'; continue;}
    if(S[i]=='h'){S[i]='u'; continue;}
    if(S[i]=='i'){S[i]='v'; continue;}
    if(S[i]=='j'){S[i]='w'; continue;}
    if(S[i]=='k'){S[i]='x'; continue;}
    if(S[i]=='l'){S[i]='y'; continue;}
    if(S[i]=='m'){S[i]='z'; continue;}
    if(S[i]=='n'){S[i]='a'; continue;}
    if(S[i]=='o'){S[i]='b'; continue;}
    if(S[i]=='p'){S[i]='c'; continue;}
    if(S[i]=='q'){S[i]='d';continue;}
    if(S[i]=='r'){S[i]='e'; continue;}
    if(S[i]=='s'){S[i]='f'; continue;}
    if(S[i]=='t'){S[i]='g'; continue;}
    if(S[i]=='u'){S[i]='h'; continue;}
    if(S[i]=='v'){S[i]='i'; continue;}
    if(S[i]=='w'){S[i]='j'; continue;}
    if(S[i]=='x'){S[i]='k';continue;}
    if(S[i]=='y'){S[i]='l'; continue;}
    if(S[i]=='z'){S[i]='m'; continue;}
  }
  return S;
}
ll GD(ll num){//各桁の和
    ll digit=0;
    while(num!=0){
        digit+=num%10;
        num/=10;
    }
    return digit;
}
bool if_integer( ld x ){//整数判定
  return std::floor(x)==x;
}
bool if_prime(ll x){
  bool a=true;
  for(ll i=2;i*i<=x;i++){
   if(x%i==0){
    a=false;break; 
   }
  }
  if(x==1)a=false;
  return a;
}
ll gcd(ll x, ll y)//最大公約数
{
   if (x%y == 0)
   {
       return(y);
   }
   else
   {
       return(gcd(y, x%y));
   }
}

ll lcm(ll x, ll y)//最小公倍数
{
   return x / gcd(x, y)*y ;
}
inline ll mod(ll a, ll m) {
    return (a % m + m) % m;
}
ll modPow(ll a, ll n, ll p) {
  if (n == 0) return 1; // 0乗にも対応する場合
  if (n == 1) return a % p;
  if (n % 2 == 1) return (a * modPow(a, n - 1, p)) % p;
  ll t = modPow(a, n / 2, p);
  return (t * t) % p;
}
ll extGCD(ll a, ll b, ll &x, ll &y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    ll d = extGCD(b, a%b, y, x);
    y -= a/b * x;
    return d;
}
int main() {
  ll n,k;cin>>n>>k;
  ll sum=0;
  sum+=100*(n)*(n+1)/2*k;
  sum+=n*(k)*(k+1)/2;
  cout<<sum;
}