#include <bits/stdc++.h>
using namespace std;
int main(){
int n,q,b,s,g,y,d;
cin>>n;
q = n / 1000;
b = n / 100 % 10;
s = n / 10 % 10;
g = n % 10;
y = g * 1000 + s * 100 + b * 10 + q;
d = y - n;
cout<<y<<"-"<<n<<"="<<d<<endl;
}
/**************************************************************
Problem: 1709
User: admin
Language: C++
Result: Accepted
Time:9 ms
Memory:2072 kb
****************************************************************/