#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const int INF = 1e9;
const ll LINF = 1e18;
struct BigInt {
static const int BASE = 1e9;
static const int B = 9;
vector<int> a;
BigInt() {}
BigInt(ll x) {
for (; x > 0; x /= BASE) {
a.push_back(x % BASE);
}
}
BigInt(const string &s) {
for (int i = (int)s.size() - 1; i >= 0; i -= B) {
int beg = max(0, i - B + 1);
int len = i - beg + 1;
int block = stoi(s.substr(beg, len));
a.push_back(block);
}
trim();
}
void trim() {
while (!a.empty() && a.back() == 0) {
a.pop_back();
}
}
bool isZero() {
return (a.empty());
}
BigInt operator+=(const BigInt &other) {
int n = a.size(), m = other.a.size();
int carry = 0;
for (int i = 0; i < max(n, m) || carry; i++) {
if (i == a.size()) {
a.push_back(0);
}
a[i] += (i < m ? other.a[i] : 0) + carry;
carry = (a[i] >= BASE);
if (carry) a[i] -= BASE;
}
return *this;
}
BigInt operator-=(const BigInt &other) {
int m = other.a.size();
int carry = 0;
for (int i = 0; i < m || carry; i++) {
a[i] -= (i < m ? other.a[i] : 0) + carry;
carry = (a[i] < 0);
if (carry) a[i] += BASE;
}
trim();
return *this;
}
BigInt operator*=(int b) {
if (b >= BASE) {
return *this *= BigInt(b);
}
int n = a.size();
int carry = 0;
for (int i = 0; i < n || carry; i++) {
if (i == a.size()) {
a.push_back(0);
}
ll cur = 1ll * a[i] * b + carry;
a[i] = cur % BASE;
carry = cur / BASE;
}
trim();
return *this;
}
BigInt operator*=(const BigInt &other) {
int n = a.size(), m = other.a.size();
vector<int> c(n + m, 0);
for (int i = 0; i < n; i++) {
int carry = 0;
for (int j = 0; j < m || carry; j++) {
ll cur = c[i + j] + 1ll * a[i] * (j < m ? other.a[j] : 0) + carry;
c[i + j] = cur % BASE;
carry = cur / BASE;
}
}
swap(a, c);
trim();
return *this;
}
BigInt operator/=(int b) {
int n = a.size();
int carry = 0;
for (int i = n - 1; i >= 0; i--) {
ll cur = a[i] + 1ll * carry * BASE;
a[i] = cur / b;
carry = cur % b;
}
trim();
return *this;
}
BigInt operator+(const BigInt &other) const {
return BigInt(*this) += other;
}
BigInt operator-(const BigInt &other) const {
return BigInt(*this) -= other;
}
BigInt operator*(int b) const {
return BigInt(*this) *= b;
}
BigInt operator*(const BigInt &other) const {
return BigInt(*this) *= other;
}
BigInt operator/(int b) const {
return BigInt(*this) /= b;
}
int operator%(int b) const {
int n = a.size();
int carry = 0;
for (int i = n - 1; i >= 0; i--) {
ll cur = a[i] + 1ll * carry * BASE;
carry = cur % b;
}
return carry;
}
bool operator==(const BigInt &other) const {
return (a == other.a);
}
bool operator!=(const BigInt &other) const {
return !(*this == other);
}
bool operator<(const BigInt &other) const {
int n = a.size(), m = other.a.size();
if (n != m) {
return (n < m);
}
for (int i = n - 1; i >= 0; i--) {
if (a[i] != other.a[i]) {
return (a[i] < other.a[i]);
}
}
return false;
}
bool operator>(const BigInt &other) const {
return (other < *this);
}
bool operator<=(const BigInt &other) const {
return !(other < *this);
}
bool operator>=(const BigInt &other) const {
return !(*this < other);
}
friend istream& operator>>(istream &in, BigInt &num) {
string s;
in >> s;
num = BigInt(s);
return in;
}
friend ostream& operator<<(ostream &out, const BigInt &num) {
out << (num.a.empty() ? 0 : num.a.back());
for (int i = (int)num.a.size() - 2; i >= 0; i--) {
out << setw(B) << setfill('0') << num.a[i];
}
return out;
}
};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
BigInt a, b;
cin >> a >> b;
cout << a + b << '\n';
if (a < b) {
cout << '-' << b - a << '\n';
}
else {
cout << a - b << '\n';
}
cout << a * b << '\n';
}