#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main()
{
int a,b;
scanf("%d%d",&a,&b);
bool t=false;
int ans = a+b;
if(ans<0)
t=true;
ans = abs(ans);
stringstream str;
str<<ans;
string s = str.str();
int len = s.length();
reverse(s.begin(),s.end());
int counts = 0;
string _ws;
for(int i=0;i<len;i++)
{
_ws.push_back(s[i]);
counts++;
if(counts==3&&i!=len-1)
{
counts = 0;
_ws.push_back(',');
}
}
if(t) _ws.push_back('-');
reverse(_ws.begin(),_ws.end());
cout<<_ws<<endl;
}