#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 132222;
const long long mod = 1000000007;
const double eps = 1e-9;
double d;
int x, y, n;
double calc(double p) {
  double ret = fabs(p / d - double(x) / y);
  return ret;
}
int solve() {
  double l = 0, r = 10000000000;
  double mid, midmid;
  double midv, midmidv;
  while (r - l > eps) {
    mid = (l + r) / 2;
    midmid = (mid + r) / 2;
    midv = calc(mid);
    midmidv = calc(midmid);
    if (midv <= midmidv)
      r = midmid;
    else
      l = mid;
  }
  int aa = l;
  int bb = l + 1;
  if (calc(aa) <= calc(bb))
    return aa;
  else
    return bb;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
struct fract {
  long long num;
  long long den;
  fract(long long nu = 0, long long de = 1) {
    num = nu;
    den = de;
    if (den < 0) {
      num = -num;
      den = -den;
    }
    long long g = gcd(abs(num), den);
    this->num = num / g;
    this->den = den / g;
  }
  bool operator<(const fract &o) const { return num * o.den < den * o.num; }
  fract operator-(const fract &o) const {
    return fract(num * o.den - den * o.num, den * o.den);
  }
};
int main() {
  cin >> x >> y >> n;
  fract quas(x, y);
  fract small(10000000, 1);
  fract res;
  for (int i = (1); i < (n + 1); i++) {
    d = i;
    int a = solve();
    fract p(a, i);
    fract q = p - quas;
    q.num = abs(q.num);
    q.den = abs(q.den);
    if (q < small) {
      small = q;
      res = p;
    }
  }
  cout << res.num << '/' << res.den << endl;
}

### 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 = 0x3f3f3f3f;
const int maxn = 132222;
const long long mod = 1000000007;
const double eps = 1e-9;
double d;
int x, y, n;
double calc(double p) {
  double ret = fabs(p / d - double(x) / y);
  return ret;
}
int solve() {
  double l = 0, r = 10000000000;
  double mid, midmid;
  double midv, midmidv;
  while (r - l > eps) {
    mid = (l + r) / 2;
    midmid = (mid + r) / 2;
    midv = calc(mid);
    midmidv = calc(midmid);
    if (midv <= midmidv)
      r = midmid;
    else
      l = mid;
  }
  int aa = l;
  int bb = l + 1;
  if (calc(aa) <= calc(bb))
    return aa;
  else
    return bb;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
struct fract {
  long long num;
  long long den;
  fract(long long nu = 0, long long de = 1) {
    num = nu;
    den = de;
    if (den < 0) {
      num = -num;
      den = -den;
    }
    long long g = gcd(abs(num), den);
    this->num = num / g;
    this->den = den / g;
  }
  bool operator<(const fract &o) const { return num * o.den < den * o.num; }
  fract operator-(const fract &o) const {
    return fract(num * o.den - den * o.num, den * o.den);
  }
};
int main() {
  cin >> x >> y >> n;
  fract quas(x, y);
  fract small(10000000, 1);
  fract res;
  for (int i = (1); i < (n + 1); i++) {
    d = i;
    int a = solve();
    fract p(a, i);
    fract q = p - quas;
    q.num = abs(q.num);
    q.den = abs(q.den);
    if (q < small) {
      small = q;
      res = p;
    }
  }
  cout << res.num << '/' << res.den << endl;
}

```