#include <bits/stdc++.h>
using namespace std;
const int inf = 0;
const double eps = 0;
const int ms = 0;
const int md = 0;
const int MAX_N = 1e5 + 5;
const int MAX_L = 20;
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 7;
int main() {
  long long x, y, n;
  cin >> x >> y >> n;
  long long a = 0, b = 1;
  for (int i = 1; i <= n; i++) {
    long long delta = abs(x * b * i - a * y * i);
    long long t1 = (double)x * i / y;
    long long t2 = t1 + 1;
    long long td1 = abs(t1 * b * y - x * b * i);
    long long td2 = abs(t2 * b * y - x * b * i);
    if (td1 < delta) delta = td1, a = t1, b = i;
    if (td2 < delta) delta = td2, a = t2, b = i;
  }
  cout << a << "/" << b << endl;
  return 0;
}

### Prompt

Please formulate 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>
using namespace std;
const int inf = 0;
const double eps = 0;
const int ms = 0;
const int md = 0;
const int MAX_N = 1e5 + 5;
const int MAX_L = 20;
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 7;
int main() {
  long long x, y, n;
  cin >> x >> y >> n;
  long long a = 0, b = 1;
  for (int i = 1; i <= n; i++) {
    long long delta = abs(x * b * i - a * y * i);
    long long t1 = (double)x * i / y;
    long long t2 = t1 + 1;
    long long td1 = abs(t1 * b * y - x * b * i);
    long long td2 = abs(t2 * b * y - x * b * i);
    if (td1 < delta) delta = td1, a = t1, b = i;
    if (td2 < delta) delta = td2, a = t2, b = i;
  }
  cout << a << "/" << b << endl;
  return 0;
}

```