#include #include int main() { int i, j, n; std::string ans; std::cin >> n; while (true) { j = n % 10; n /= 10; ans = std::to_string(j) + ans; if ((i != 0) && (i % 3 == 0)) { ans = "," + ans; } i += 1; if (n <= 0) { break; } } std::cout << ans << std::endl; return 0; }