#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <stack>
using namespace std;
const int maxn=1e4+10,Mod=10000;
int read(){
int x=1,a=0;char ch=getchar();
while (ch<'0'||ch>'9'){if (ch=='-') x=-1;ch=getchar();}
while (ch>='0'&&ch<='9'){a=a*10+ch-'0';ch=getchar();}
return x*a;
}
int n,m;
struct bignum{
int num[maxn],len;
void clear(){while (!num[len]&&len>1)--len;}//去掉前导零
bignum(){len=0;memset(num,0,sizeof(num));}
void print(){//输出
printf("%d",num[len]);
for (int i = len-1;i > 0;i--){
if (num[i]==0){printf("0000");continue;}
for (int k = 10;k*num[i] < Mod;k*=10) printf("0");
printf("%d",num[i]);
}
}
bignum& operator = (int x){
stack<char> st;string s;
if (!x) return *this="0";
while (x){
st.push(x%10+'0');
x/=10;
}
while (!st.empty()) s+=st.top(),st.pop();
return *this=s;
}
bignum& operator = (const string &x){
memset(num,0,sizeof num);len=0;
int l=x.length();
for(int i = 0;i <= l;i++){
int j=(l-i+(Mod-1))/Mod;
num[j]=(num[j]<<1)+(num[j]<<3)+(x[i]^48);
}
len=(l+(Mod-1))/Mod;
return *this;
}
}a,b,ans1,ans2,ans3,ans4;
bignum operator + (const bignum &a,const bignum &b){//高精+高精
bignum c;c.len=max(a.len,b.len);int x=0;
for (int i = 1;i <= c.len;i++){
c.num[i]=a.num[i]+b.num[i]+x;
x=c.num[i]/Mod;
c.num[i]%=Mod;
}
if (x>0) c.num[++c.len]=x;
return c;
}
bignum operator * (const bignum &a,const int &b){//高精×低精
bignum c;c.len=a.len;int x=0;
for (int i = 1;i <= c.len;i++){
c.num[i]=a.num[i]*b+x;
x=c.num[i]/Mod;
c.num[i]%=Mod;
}
while (x>0) c.num[++c.len]=x%Mod,x/=Mod;
return c;
}
bignum operator * (const bignum &a,const bignum &b){//高精×高精
bignum c;c.len=a.len+b.len;
for (int i = 1;i <= a.len;i++){
for (int j = 1;j <= b.len;j++){
c.num[i+j-1]+=a.num[i]*b.num[j];
c.num[i+j]+=c.num[i+j-1]/Mod;
c.num[i+j-1]%=Mod;
}
}
c.clear();
return c;
}
bignum operator - (bignum a,const bignum &b){//高精-高精
for (int i = 1;i <= a.len;i++){
a.num[i]-=b.num[i];
if (a.num[i]<0) --a.num[i+1],a.num[i]+=Mod;
}
a.clear();
return a;
}
bignum operator / (const bignum &a,const int &b){//高精/低精
bignum c;c.len=a.len;int x=0;
for (int i = a.len;i > 0;i--){
x=x*Mod+a.num[i];
c.num[i]=x/b;
x%=b;
}
c.clear();
return c;
}
int operator % (const bignum &a,const int &b){//高精%低精
int x=0;
for (int i = a.len;i > 0;i--){
x=x*Mod+a.num[i];
x%=b;
}
return x;
}
bool operator > (const bignum &a,const bignum &b){
if (a.len>b.len) return 1;
if (a.len<b.len) return 0;
for (int i = a.len;i > 0;i--){
if (a.num[i]>b.num[i]) return 1;
if (a.num[i]<b.num[i]) return 0;
}
return 1;
}
bignum max(const bignum &a,const bignum &b){
if (a>b) return a;
return b;
}
bignum min(const bignum &a,const bignum &b){
if (a>b) return b;
return a;
}
string s2,s1;
int main(){
cin>>s1>>s2;
a=s1,b=s2;
ans1=a+b;ans1.print();printf("
");
if (a > b){ans2=a-b;ans2.print();printf("
");}
else{ans2=b-a;printf("-");ans2.print();printf("
");}
ans3=a*b;ans3.print();printf("
");
return 0;
}