#include "bits/stdc++.h" using namespace std; int main() { string N, X = ""; cin >> N; for (int i = 0; i < N.size() - 1; i++) { X = N[N.size() - i - 1] + X; if (i % 3 == 2) X = ',' + X; } cout << N[0] << X << endl; }