#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
vector<int> mods = {1000000007, 1000000009, 998244353};
const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 200005;
const int mod = mods[0];
void task() {
  long double x, y, n;
  cin >> x >> y >> n;
  long double frac = (x / y);
  long double mn = inf * 1.0;
  int a, b;
  for (long double i = 1; i <= n; i++) {
    long double ratio = (x * i) / y;
    long double n1 = floor(ratio), n2 = ceil(ratio);
    long double r1 = (n1 / i), r2 = (n2 / i);
    long double different = abs(frac - r1);
    if (different < mn) {
      mn = different, a = n1, b = i;
    }
    different = abs(frac - r2);
    if (different < mn) {
      mn = different, a = n2, b = i;
    }
  }
  cout << a << '/' << b << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  for (int __ = 1; __ <= T; __++) {
    task();
  }
  return 0;
}

### Prompt

Your challenge is to write a cpp solution to the following problem:

You are given three positive integers x, y, n. Your task is to find the nearest fraction to fraction <image> whose denominator is no more than n. 

Formally, you should find such pair of integers a, b (1 ≤ b ≤ n; 0 ≤ a) that the value <image> is as minimal as possible.

If there are multiple "nearest" fractions, choose the one with the minimum denominator. If there are multiple "nearest" fractions with the minimum denominator, choose the one with the minimum numerator.

Input

A single line contains three integers x, y, n (1 ≤ x, y, n ≤ 105).

Output

Print the required fraction in the format "a/b" (without quotes).

Examples

Input

3 7 6


Output

2/5


Input

7 2 4


Output

7/2

### Response

```cpp
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
vector<int> mods = {1000000007, 1000000009, 998244353};
const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 200005;
const int mod = mods[0];
void task() {
  long double x, y, n;
  cin >> x >> y >> n;
  long double frac = (x / y);
  long double mn = inf * 1.0;
  int a, b;
  for (long double i = 1; i <= n; i++) {
    long double ratio = (x * i) / y;
    long double n1 = floor(ratio), n2 = ceil(ratio);
    long double r1 = (n1 / i), r2 = (n2 / i);
    long double different = abs(frac - r1);
    if (different < mn) {
      mn = different, a = n1, b = i;
    }
    different = abs(frac - r2);
    if (different < mn) {
      mn = different, a = n2, b = i;
    }
  }
  cout << a << '/' << b << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  for (int __ = 1; __ <= T; __++) {
    task();
  }
  return 0;
}

```