Little Petya likes numbers a lot. He found that number 123 in base 16 consists of two digits: the first is 7 and the second is 11. So the sum of digits of 123 in base 16 is equal to 18.

Now he wonders what is an average value of sum of digits of the number A written in all bases from 2 to A - 1.

Note that all computations should be done in base 10. You should find the result as an irreducible fraction, written in base 10.

Input

Input contains one integer number A (3 ≤ A ≤ 1000).

Output

Output should contain required average value in format «X/Y», where X is the numerator and Y is the denominator.

Examples

Input

5


Output

7/3


Input

3


Output

2/1

Note

In the first sample number 5 written in all bases from 2 to 4 looks so: 101, 12, 11. Sums of digits are 2, 3 and 2, respectively.
#include <bits/stdc++.h>
using namespace std;
int main() {
  int Dango, otroDango = 0, copiaDango;
  bool Dangotrue = true;
  cin >> Dango;
  for (int auxDango = 2; auxDango < Dango; auxDango++) {
    copiaDango = Dango;
    do {
      otroDango += copiaDango % auxDango;
      copiaDango /= auxDango;
    } while (copiaDango >= 1);
  }
  Dango -= 2;
  while (Dangotrue) {
    if (otroDango % 2 == 0 && Dango % 2 == 0) {
      otroDango /= 2;
      Dango /= 2;
    } else {
      Dangotrue = false;
      if (Dango > 3) {
        for (int auxDango = 3; auxDango <= Dango && Dangotrue == false;
             auxDango += 2) {
          if (otroDango % auxDango == 0 && Dango % auxDango == 0) {
            otroDango /= auxDango;
            Dango /= auxDango;
            Dangotrue = true;
            auxDango = Dango + 1;
          }
        }
      }
    }
  }
  cout << otroDango << "/" << Dango;
  return 0;
}
