#include <bits/stdc++.h>
using namespace std;
long long x, y, n;
void read() { cin >> x >> y >> n; }
long long euclid(long long a, long long b) {
  if (a < b) swap(a, b);
  long long t;
  while (b) {
    t = b;
    b = a % t;
    a = t;
  }
  return a;
}
long long f(long long p, long long q) {
  long long nok = euclid(p, q);
  return p * q / nok;
}
const double eps = 0.00000000000001;
bool ask(double f1, double f2) {
  f1 *= 100000000000LL;
  f2 *= 100000000000LL;
  long long r1 = f1;
  long long r2 = f2;
  return r1 > r2;
}
bool fun(long long h1, long long h2, long long crdom, long long r1,
         long long r2) {
  long long d1 = f(crdom, r2);
  long long d2 = d1 / y;
  d2 *= x;
  long long t2 = d1 / h2;
  t2 *= h1;
  long long t3 = d1 / r2;
  t3 *= r1;
  return abs(d2 - t2) < abs(d2 - t3);
}
void solve() {
  long long dom, num, tmp, curdom, tmpn, tt, ansd, ansn;
  double diff = 10000000.0, cur, m;
  m = (double)x / y;
  for (int i = 1; i <= n; ++i) {
    dom = i;
    curdom = f(i, y);
    tmp = curdom / i;
    tmpn = curdom / y;
    tmpn *= x;
    tt = tmpn / tmp;
    cur = (double)tt / dom;
    cur -= m;
    cur = fabs(cur);
    if (diff == -2.0 || (fun(tt, dom, curdom, ansn, ansd))) {
      diff = cur;
      ansd = dom;
      ansn = tt;
    }
    tt++;
    cur = (double)tt / dom;
    cur -= m;
    cur = fabs(cur);
    if (diff == -2.0 || (fun(tt, dom, curdom, ansn, ansd))) {
      diff = cur;
      ansd = dom;
      ansn = tt;
    }
  }
  cout << ansn << '/' << ansd << endl;
}
int main() {
  read();
  solve();
  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>
using namespace std;
long long x, y, n;
void read() { cin >> x >> y >> n; }
long long euclid(long long a, long long b) {
  if (a < b) swap(a, b);
  long long t;
  while (b) {
    t = b;
    b = a % t;
    a = t;
  }
  return a;
}
long long f(long long p, long long q) {
  long long nok = euclid(p, q);
  return p * q / nok;
}
const double eps = 0.00000000000001;
bool ask(double f1, double f2) {
  f1 *= 100000000000LL;
  f2 *= 100000000000LL;
  long long r1 = f1;
  long long r2 = f2;
  return r1 > r2;
}
bool fun(long long h1, long long h2, long long crdom, long long r1,
         long long r2) {
  long long d1 = f(crdom, r2);
  long long d2 = d1 / y;
  d2 *= x;
  long long t2 = d1 / h2;
  t2 *= h1;
  long long t3 = d1 / r2;
  t3 *= r1;
  return abs(d2 - t2) < abs(d2 - t3);
}
void solve() {
  long long dom, num, tmp, curdom, tmpn, tt, ansd, ansn;
  double diff = 10000000.0, cur, m;
  m = (double)x / y;
  for (int i = 1; i <= n; ++i) {
    dom = i;
    curdom = f(i, y);
    tmp = curdom / i;
    tmpn = curdom / y;
    tmpn *= x;
    tt = tmpn / tmp;
    cur = (double)tt / dom;
    cur -= m;
    cur = fabs(cur);
    if (diff == -2.0 || (fun(tt, dom, curdom, ansn, ansd))) {
      diff = cur;
      ansd = dom;
      ansn = tt;
    }
    tt++;
    cur = (double)tt / dom;
    cur -= m;
    cur = fabs(cur);
    if (diff == -2.0 || (fun(tt, dom, curdom, ansn, ansd))) {
      diff = cur;
      ansd = dom;
      ansn = tt;
    }
  }
  cout << ansn << '/' << ansd << endl;
}
int main() {
  read();
  solve();
  return 0;
}

```