#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T ceilDiv(T l, T r) {
  return (l / r) + ((l % r) != 0);
}
const int INFTY = numeric_limits<int>::max();
template <typename T1, typename T2>
ostream &operator<<(ostream &o, const pair<T1, T2> &p) {
  return o << '(' << p.first << ", " << p.second << ')';
}
long long gcd(long long a, long long b) {
  while (b) a = a % b, swap(a, b);
  return a;
}
void normalize(pair<long long, long long> &fract) {
  long long g = gcd(fract.first, fract.second);
  fract.first /= g;
  fract.second /= g;
}
pair<long long, long long> sub(const pair<long long, long long> &f1,
                               const pair<long long, long long> &f2) {
  pair<long long, long long> r;
  r.second = f1.second * f2.second;
  r.first = f1.first * f2.second - f2.first * f1.second;
  normalize(r);
  return r;
}
pair<long long, long long> piiabs(const pair<long long, long long> &f) {
  pair<long long, long long> r = f;
  if (r.first < 0) r.first *= -1;
  if (r.second < 0) r.second *= -1;
  return r;
}
int lessff(const pair<long long, long long> &f1,
           const pair<long long, long long> &f2) {
  long long l = f1.first * f2.second;
  long long r = f2.first * f1.second;
  if (l < r) return -1;
  if (l > r) return 1;
  return 0;
}
long double eval(const pair<long long, long long> &f) {
  return (long double)(f.first) / f.second;
}
bool lessf(const pair<long long, long long> &f1,
           const pair<long long, long long> &f2) {
  if (f1.second < f2.second) return true;
  if (f1.second > f2.second) return false;
  if (f1.first < f2.first) return true;
  return false;
}
long double ldabs(long double a) { return a < 0 ? -a : a; }
int main(int argc, char **argv) {
  ios_base::sync_with_stdio(false), cin.tie(0);
  long long x, y, n;
  cin >> x >> y >> n;
  pair<long long, long long> fractInit(x, y), r(0, 1), fracBest(x, y);
  long long inc[] = {-2, -1, 0, 1, 2};
  int nInc = sizeof(inc) / sizeof(long long);
  for (long long d = 1; d <= n; d += 1) {
    for (int i = 0; i < nInc; i += 1) {
      pair<long long, long long> tp1 =
          pair<long long, long long>(x * d / y + inc[i], d);
      pair<long long, long long> t1 = piiabs(sub(fractInit, tp1));
      if (tp1.second <= n && tp1.first >= 0 && lessff(t1, fracBest) <= 0) {
        if (lessff(t1, fracBest) == 0) {
          if (lessf(tp1, r)) r = tp1;
        } else {
          r = tp1;
        }
        fracBest = t1;
      }
    }
  }
  cout << r.first << '/' << r.second << '\n';
  return 0;
}

### Prompt

Construct a cpp code solution to the problem outlined:

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;
template <typename T>
inline T ceilDiv(T l, T r) {
  return (l / r) + ((l % r) != 0);
}
const int INFTY = numeric_limits<int>::max();
template <typename T1, typename T2>
ostream &operator<<(ostream &o, const pair<T1, T2> &p) {
  return o << '(' << p.first << ", " << p.second << ')';
}
long long gcd(long long a, long long b) {
  while (b) a = a % b, swap(a, b);
  return a;
}
void normalize(pair<long long, long long> &fract) {
  long long g = gcd(fract.first, fract.second);
  fract.first /= g;
  fract.second /= g;
}
pair<long long, long long> sub(const pair<long long, long long> &f1,
                               const pair<long long, long long> &f2) {
  pair<long long, long long> r;
  r.second = f1.second * f2.second;
  r.first = f1.first * f2.second - f2.first * f1.second;
  normalize(r);
  return r;
}
pair<long long, long long> piiabs(const pair<long long, long long> &f) {
  pair<long long, long long> r = f;
  if (r.first < 0) r.first *= -1;
  if (r.second < 0) r.second *= -1;
  return r;
}
int lessff(const pair<long long, long long> &f1,
           const pair<long long, long long> &f2) {
  long long l = f1.first * f2.second;
  long long r = f2.first * f1.second;
  if (l < r) return -1;
  if (l > r) return 1;
  return 0;
}
long double eval(const pair<long long, long long> &f) {
  return (long double)(f.first) / f.second;
}
bool lessf(const pair<long long, long long> &f1,
           const pair<long long, long long> &f2) {
  if (f1.second < f2.second) return true;
  if (f1.second > f2.second) return false;
  if (f1.first < f2.first) return true;
  return false;
}
long double ldabs(long double a) { return a < 0 ? -a : a; }
int main(int argc, char **argv) {
  ios_base::sync_with_stdio(false), cin.tie(0);
  long long x, y, n;
  cin >> x >> y >> n;
  pair<long long, long long> fractInit(x, y), r(0, 1), fracBest(x, y);
  long long inc[] = {-2, -1, 0, 1, 2};
  int nInc = sizeof(inc) / sizeof(long long);
  for (long long d = 1; d <= n; d += 1) {
    for (int i = 0; i < nInc; i += 1) {
      pair<long long, long long> tp1 =
          pair<long long, long long>(x * d / y + inc[i], d);
      pair<long long, long long> t1 = piiabs(sub(fractInit, tp1));
      if (tp1.second <= n && tp1.first >= 0 && lessff(t1, fracBest) <= 0) {
        if (lessff(t1, fracBest) == 0) {
          if (lessf(tp1, r)) r = tp1;
        } else {
          r = tp1;
        }
        fracBest = t1;
      }
    }
  }
  cout << r.first << '/' << r.second << '\n';
  return 0;
}

```