#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
#define ll long long
#define ls rt<<1
#define rs ls1
#define lson l,mid,ls
#define rson mid+1,r,rs
#define middle (l+r)>>1
#define eps (1e-9)
#define clr_all(x,c) memset(x,c,sizeof(x))
#define clr(x,c,n) memset(x,c,sizeof(x[0])*(n+1))
#define MOD 1000000007
#define inf 100000007
#define pi acos(-1.0)
#define M 200000+5
int a,cn,b;
void count(int x,int y){
int i=0,c=x,d;
d=y/c;
while(d>=x) {
c*=x;
d=y/c;
}
while(c>0){
cn+=(y/c);
y%=c;
c/=x;
}
}
int gcd(int x,int y){
int z;
while(x!=0){
z=x;x=y%x;y=z;
}
return y;
}
int main(){
int t,i,j;
while(scanf("%d",&a)!=EOF){
cn=0;
for(i=2;i<a;i++){
b=a;
count(i,b);
}
t=a-2;
if(t>=2){
j=gcd(cn,t);
cn/=j;t/=j;
}
printf("%d/%d\n",cn,t);
}
return 0;
}
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
#define ll long long
#define ls rt<<1
#define rs ls1
#define lson l,mid,ls
#define rson mid+1,r,rs
#define middle (l+r)>>1
#define eps (1e-9)
#define clr_all(x,c) memset(x,c,sizeof(x))
#define clr(x,c,n) memset(x,c,sizeof(x[0])*(n+1))
#define MOD 1000000007
#define inf 100000007
#define pi acos(-1.0)
#define M 200000+5
int a,cn,b;
void count(int x,int y){
int i=0,c=x,d;
d=y/c;
while(d>=x) {
c*=x;
d=y/c;
}
while(c>0){
cn+=(y/c);
y%=c;
c/=x;
}
}
int gcd(int x,int y){
int z;
while(x!=0){
z=x;x=y%x;y=z;
}
return y;
}
int main(){
int t,i,j;
while(scanf("%d",&a)!=EOF){
cn=0;
for(i=2;i<a;i++){
b=a;
count(i,b);
}
t=a-2;
if(t>=2){
j=gcd(cn,t);
cn/=j;t/=j;
}
printf("%d/%d\n",cn,t);
}
return 0;
}