#include<iostream> #include<cstdio> using namespace std; int main(){ int n; while(scanf("%d",&n)==1){ int k = 1; while(k*(k+1)/2<n)k++; k--; int t = n-k*(k+1)/2; k++; if(k%2==0) printf("TERM %d IS %d/%d\n",n,t,k+1-t); else printf("TERM %d IS %d/%d\n",n,k+1-t,t); //cout<<t<<"/"<<k+1-t<<endl; } return 0; }