#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int n, m, d, p, q, x, y;
cin >> n;
m = sqrt(n);
p = m % 2 ? -1 : 1;
q = p == 1 ? 0 : 1;
d = n - m * m;
if(d <= m)
{
x = p * (d - m/2);
y = p * (- m/2) + q;
}
else
{
x = p * (- m/2 + m);
y = p * (d - m - m/2) + q;
}
cout << "(" << x << "," << y << ")";
return 0;
}