include "stdafx.h"
#include<iostream>
#include<vector>
#include <algorithm>
#include<iomanip>
#include<string>
#include<numeric>
#include<set>
using namespace std;
int toNum(int num, int i)
{
int sum = 0;
while (num!=0)
{
sum += (num%i);
num = num / i;
}
return sum;
}
void getNum(int n, int m)
{
for (int i = m; i > 1; i--)
{
if (n%i == 0 && m%i==0)
{
n = n / i;
m = m / i;
break;
}
}
cout << n << "/" << m << endl;
}
int main()
{
int n;
while (cin>>n)
{
float sum = 0;
for (int i = 2; i < n; i++)
{
sum += toNum(n,i);
}
getNum(sum,n-2);
}
}