//============================================================================
// Name        : Contest
// Author      : The Assassin
// Version     : V.1
// Copyright   : Belong to the Brotherhood
// Description : By the way of The Assassins ISA Accepted [[fakss31]]
//============================================================================

#include <bits/stdc++.h>
using namespace std;

#define For(i,st,ed) for(int i=st;i<ed;i++)
#define rFor(i,ed,st) for(int i=ed-1;i>=st;i--)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()

#define cin_i(i) scanf("%d",&i)
#define cin_li(i) scanf("%I64d",&i)
#define cin_f(i) scanf("%f",&i)
#define cin_d(i) scanf("%lf",&i)
#define cin_c(i) scanf("%c",&i)
#define cin_2i(i,j) scanf("%d %d",&i,&j)
#define cin_2d(i,j) scanf("%lf %lf",&i ,&j)
#define cin_3i(i,j,k) scanf("%d %d %d",&i,&j,&k)
#define cin_3li(i,j,k) scanf("%I64d %I64d %I64d",&i,&j,&k)
#define cout_i(i) printf("%d ",i)
#define cout_2i(i,j) printf("%d %d ",i,j)
#define cout_li(i) printf("%I64d\n",i)

#define Pair(a) (a).first,(a).second
#define vb     vector<bool>
#define vi     vector<int>
#define fi first
#define se second
#define endl      '\n'
#define pi  3.14159265359
#define ll  long long int
#define ull unsigned long long int
#define pb(i)      push_back(i)
#define mp(i,j)      make_pair(i,j)

//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);

using namespace std;

// 1. Read the problem statement
// 2. make the problem abstract
// 3. design an algorithm
// 4. implement and debug
// 5. submit ==> if not AC go to step 4

//=================================================
ll x,y;
bool compare(ll a ,ll b , ll num , ll dem)
{
    ll koko = x * b*dem;
    ll soso = a * y * dem ;
    ll toto = num * y *b;

    return (abs(koko-soso)<=abs(koko-toto)?1:0);
}
int main()
{

    ios::sync_with_stdio(false);
    ll n;
    cin>>x>>y>>n;

    ll common_factor=__gcd(x,y);
    x/=common_factor , y/=common_factor;

    if(n>=y) return cout<<x<<"/"<<y,0;

    ll c,d ,num=0,dem=1;
    while(n>0)
    {
        c=round((double(x*n)/(y))) ,d=n;
        common_factor=__gcd(c ,d);

        c=c>0?c:1;
        c/=common_factor , d/=common_factor;

        if(compare(c,d,num,dem)) num=c ,dem=d;
        if(compare(c-1,d,num,dem)) num=c-1 ,dem=d;
        n--;
    }
    cout<<num<<"/"<<dem;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	long long x, y, n;
	cin >> x >> y >> n;

	long long top = 10000000, down = 1;
	long long besta, bestb;

	for (long long b = 1; b <= n; ++b) {
		long long a1 = x * b / y, a2 = (x * b + y - 1) / y;

		long long a = a1;
		if (abs(x * b - y * a1) > abs(x * b - y * a2)) a = a2;

		if (abs(x * b - y * a) * down < y * b * top) {
			top = abs(x * b - y * a);
			down = y * b;
			besta = a, bestb = b;
		}
	}

	cout << besta << '/' << bestb << endl;
	return 0;
}

//by iforgot
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <queue>
#define eps 1e-16
#define maxint  2139062143
#define int64 long long
#define rep(i,n) for(int i = 0;i < n;i ++)
#define repf(i,a,b) for(int i = a;i < b;i ++)
#define mem(a,b) memset(a,b,sizeof(a))
#define out(x) cout<<#x<<':'<<x<<endl
#define xy x*1.0/y

using namespace std;
int x,y,n;
//double xy;
int a,b;

void data_input()
{
    scanf("%d%d%d",&x,&y,&n);
    n ++;
    //xy = (x+0.0) / (y+0.0);
}

void data_output()
{
    double ans = maxint + 0.0;
    int a1,a2;
    repf(i,1,n){
        a1 = xy * i;
        a2 = a1 + 1;
        //out(i);
        //out(ans);

        if(fabs((a1+0.0)/(i+0.0) - xy) < ans - eps){
            ans = fabs((a1+0.0)/(i+0.0) - xy);
            a = a1;
            b = i;
        }
        if(fabs((a2+0.0)/(i+0.0) - xy) < ans - eps){
            ans = fabs((a2+0.0)/(i+0.0) - xy);
            a = a2;
            b = i;
        }
    }
}
int main()
{
    //freopen("a.in","r",stdin);
    //freopen("a.out","w",stdout);
    data_input();
    //out(x);
    //out(y);
    //out(n);
    //printf("xy:%.9lf\n",xy);
    data_output();
    printf("%d/%d\n",a,b);
    return 0;
}

#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <list>
#include <bitset>
#include <deque>
#include <numeric>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <climits>
#include <sys/time.h>

using namespace std;

#define DEBUG(x) cout << #x << ": " << x << endl
#define sz(a) int((a).size())
#define all(x) (x).begin(),(x).end()
#define foreach(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
template <typename T> string tostr(const T& t) { ostringstream os; os<<t; return os.str(); }

typedef long long llong;

struct Fraction {
  llong a, b;
  Fraction(llong _a, llong _b) : a(_a), b(_b) {}
  bool operator< (const Fraction &T) const {
     if(a * T.b != T.a * b) return a * T.b < T.a * b;
     if(b != T.b) return b < T.b;
     return a < T.a;
  }
  bool operator== (const Fraction &T) const {
     return a * T.b == T.a * b;
  }
};

template<typename INT>
INT gcd(INT a, INT b) {
   if (a < 0) a = -a;
   if (b < 0) b = -b;
   if (a < b) swap(a, b);
   while (b > 0) {
      INT t = b;
      b = a % b;
      a = t;
   }
   return a > 0 ? a : 1;
}

template<typename INT>
INT lcm(INT a, INT b) {
   return a / gcd(a,b) * b;
}

int main(int argc, char *argv[]) {
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   llong x, y, n;
   cin >> x >> y >> n;
   bool ok = true;
   Fraction best = Fraction(0, 0);
   Fraction ans = Fraction(0,0);
   for(llong b = 1LL; b <= n; ++b) {
      llong a = (b * x) / y;
      for(int j = 0; j <= 1; ++j) {
         Fraction c = Fraction(abs(b * x - y * (a + j)), y * b);
         Fraction x = Fraction((a + j), b);
         if(ok || c < best) {
            best = c;
            ans = x;
            ok = false;
         }
      }
   }
   cout << ans.a << '/' << ans.b << endl;
   return 0;
}

#include<iostream>
#include<cmath>
#include<math.h>
#include<string>
#include<cstring>
#include<cstdio>
#include<cctype>
#include<algorithm>
#include<cstdlib>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include <fstream>
#include<sstream>
using namespace std;
#define For(i,a,b)  for(float i=a;i<b;i++)
#define back(i,a,b) for(float i=a;i>b;i--)
#define wait       system("pause")
#define ff     first
#define ss     second
#define vc     vector
#define error(x) cout << #x << " : " << (x) <<endl
#define erorr(x) fout<<#x<<" : "<<(x)<<endl
long long power(int a,int b)
{
     long long c=1;
     For(i,0,b)
     c*=a;
     return c;
}
int main()
{
    float x,y,n,a,b,f=100000000;
    cin>>x>>y>>n;
    if(y<=n)
    cout<<(x/__gcd((int)x,(int)y))<<'/'<<(y/__gcd((int)x,(int)y))<<endl;
    else
    {
    float s=x/y;
    For(i,1,n+1)
              For(j,(int)((i*x)/y),(int)(((i+i*x)/y)+51))
              {
                                         float c=j/i;
                        if(fabs(s-c)<f)
                        {
                                                     a=j;b=i;f=fabs(s-c);

                        }
              }
                        cout<<a<<'/'<<(b)<<endl;
             }
                        //wait;
                        return 0;
}

#include<iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <map>
#include <queue>
#include<set>
#include<stack>
using namespace std;

int main(){
    long long x, y, n;
    cin >> x >> y >> n;
    //double minimal = 10000;
    int bestx=0, besty=1;
    for (int i = 1; i <= n; i++)
    {
        long long temp = (x*i) / y;
        if (x*i - temp*y > (temp + 1)*y - x*i) temp += 1;
        if (abs(besty*(x*i - temp*y)) < abs(i*(x*besty - y*bestx)))
        {
            bestx = temp;
            besty = i;
        }
    }
    cout << bestx << "/" << besty << endl;
    //system("PAUSE");
    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <algorithm>
using namespace std;
#define in cin
#define out cout
//ifstream in("D:\\projects\\console\\1234\\input.txt");
//ofstream out("D:\\projects\\console\\1234\\output.txt");

struct pr
{
__int64 a,b;
};

#define maxx 100001

bool comp(const pr &c1, const pr &c2)
{
    if(c1.b < c2.b)
        return true;

    if(c1.b == c2.b && c1.a < c2.a)
        return true;

    return false;
}

int main(int argc, char* argv[])
{
        __int64 x,y,n;
        in>>x>>y>>n;

        __int64 a=0,b=0;
        vector<pr> v;
        double min=maxx;

        for(__int64 i=1;i<=n;i++)
        {//for

        __int64 l = 0, r = maxx;
        double d,d1,d2;
        __int64 m1,m2;
        while (r-l!=2)
            {
            m1 = l + (r - l) / 3,
            m2 = r - (r - l) / 3;
            //d1 = fabs((double)x/y-(double)m1/i);
            //d2 = fabs((double)x/y-(double)m2/i);
            d1 = fabs((double)(x*i-m1*y)/(i*y));
            d2 = fabs((double)(x*i-m2*y)/(i*y));
            if (d1 > d2)
            l = m1;
            else
            r = m2;
            }

        //d = fabs((double)x/y-(double)(l)/i);
        //d1 = fabs((double)x/y-(double)(l+1)/i);
        //d2 = fabs((double)x/y-(double)(l+2)/i);
        d = fabs((double)(x*i-l*y)/(i*y));
        d1 = fabs((double)(x*i-(l+1)*y)/(i*y));
        d2 = fabs((double)(x*i-(l+2)*y)/(i*y));

        if(d < min)
            {
            min = d;
            v.clear();
            pr s;
            s.a = l;
            s.b = i;
            v.push_back(s);
            }
        else
        if(d == min)
            {
            pr s;
            s.a = l;
            s.b = i;
            v.push_back(s);
            }
        ///////////////////////
        if(d1 < min)
            {
            min = d1;
            v.clear();
            pr s;
            s.a = l+1;
            s.b = i;
            v.push_back(s);
            }
        else
        if(d1 == min)
            {
            pr s;
            s.a = l+1;
            s.b = i;
            v.push_back(s);
            }
        //////////////////
        if(d2 < min)
            {
            min = d2;
            v.clear();
            pr s;
            s.a = l+2;
            s.b = i;
            v.push_back(s);
            }
        else
        if(d2 == min)
            {
            pr s;
            s.a = l+2;
            s.b = i;
            v.push_back(s);
            }

        }//for

        sort(v.begin(), v.end(), comp);
        out<<v[0].a<<'/'<<v[0].b;
        return 0;
}

//============================================================================
// Name        : hamopop.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
///============================================================================
#include <bits/stdc++.h>

using namespace std;
/*float x[3];
 float arr[3][10][3];
 float ahmed[3][10];
 pair<float, int> five[30];
 float m[3], r[3];
 void scaling() {
 for (int i = 0; i < 3; i++) {
 float sum = 0;
 for (int j = 0; j < 3; j++)
 for (int k = 0; k < 10; k++) {
 sum += arr[j][k][i];
 }
 m[i] = sum / 30;
 }
 for (int i = 0; i < 3; i++) {
 float sum = 0;
 for (int j = 0; j < 3; j++)
 for (int k = 0; k < 10; k++) {
 sum += (arr[j][k][i] - m[i]) * (arr[j][k][i] - m[i]);
 }
 sum /= 30;
 sum = sqrt(sum);
 r[i] = sum;
 }
 for (int i = 0; i < 3; i++)
 for (int j = 0; j < 3; j++)
 for (int k = 0; k < 10; k++)
 arr[j][k][i] = (arr[j][k][i] - m[i]) / r[i];
 for (int i = 0; i < 3; i++)
 x[i] = (x[i] - m[i]) / r[i];

 }
 void fill() {
 int k = 0;
 for (int numcl = 0; numcl < 3; numcl++) {
 for (int numr = 0; numr < 10; numr++) {
 float sum = 0;
 for (int numc = 0; numc < 3; numc++) {
 sum += (arr[numcl][numr][numc] - x[numc])
 * (arr[numcl][numr][numc] - x[numc]);
 }
 sum = sqrt(sum);
 ahmed[numcl][numr] = sum;
 five[k].first = sum;
 five[k].second = numcl;
 k++;
 }
 }

 }
 int single() {
 pair<float, int> min;
 min.first = 10000000;
 for (int i = 0; i < 3; i++)
 for (int j = 0; j < 10; j++) {
 if (ahmed[i][j] < min.first)
 min.first = ahmed[i][j], min.second = i + 1;
 }
 return min.second;
 }
 int fivex() {
 int arr[3] = { 0, 0, 0 };
 pair<int, int> ans;
 ans.first = 0;
 sort(five, five + 30);
 for (int i = 0; i < 5; i++)
 arr[five[i].second]++;
 for (int i = 0; i < 3; i++) {
 if (arr[i] > ans.first)
 ans.first = arr[i], ans.second = i + 1;
 }
 return ans.second;
 }
 int city() {
 pair<float, int> min;
 min.first = 10000000;
 for (int numcl = 0; numcl < 3; numcl++) {
 for (int numr = 0; numr < 10; numr++) {
 float sum = 0;
 for (int numc = 0; numc < 3; numc++) {
 sum += abs((arr[numcl][numr][numc] - x[numc]));
 }
 if (sum < min.first)
 min.first = sum, min.second = numcl + 1;
 }
 }
 return min.second;
 }
 int main() {
 freopen("input.txt", "rt", stdin);
 for (int i = 0; i < 3; i++)
 for (int k = 0; k < 10; k++)
 for (int r = 0; r < 3; r++)
 cin >> arr[i][k][r];
 cin >> x[0] >> x[1] >> x[2];
 string s, s1;
 cin >> s >> s1;
 if (s1 == "scaling")
 scaling();
 int ans;
 fill();
 if (s == "single")
 ans = single();
 if (s == "5th")
 ans = fivex();
 if (s == "city")
 ans = city();
 cout << "this features belong to " << ans;

 }*/
/*freopen("input.txt", "rt", stdin);
 freopen("output.txt", "wt", stdout);*/
void fun(long long b,long long d){
    int u=1;
    int v=0;
    if((b<0&&d>0)||(b>0&&d<0))  v=1;
    b=abs(b);
    d=abs(d);
    if(b<d){
        swap(b,d);
        u=0;
    }

    long long b1=b,d1=d;
    long long x=b%d;
    while(x){
        b=d;
        d=x;
        x=b%d;
    }

    if(u==0){
        if(v) d1*=-1;
        cout<<d1/d<<"/"<<b1/d;
    }
    else {
        if(v) b1*=-1;
        cout<<b1/d<<"/"<<d1/d;
    }
}

/*int main(){
    int n;
    cin>>n;
    pair<int ,int > arr[n];
    int a,b,c,d;
    int z;
    cin>>z;
    cin>>a>>b>>z>>c>>d;

    if((c>a&&c<b)||(d>a&&d<a))
        arr[n-2].second=1;

    else arr[n-2].second=0;

    if((a>c&&a<d)||(b>c&&b<d))
        arr[n-1].first=1;

    else arr[n-1].first=0;

    a=c; b=d;
    int j=n-3;

    n-=2;

    while(n--){

        cin>>z;
        if(z==1){
            cin>>c>>d;
            if((c>a&&c<b)||(d>a&&d<b))
                    arr[j].second=1;

            else arr[j].second=0;

            if((a>c&&a<d)||(b>c&&b<d))
                    arr[j+1].first=1;

            else arr[j+1].first=0;

            a=c,b=d;
            j--;
        }

        else{
            int x,y;
            cin>>x>>y;
            y+=j;
            x+=j;
            int u=0;
            if(x<y){

                while(x!=y){
                    if(!arr[x].second) {
                        u=1;
                        break;
                    }
                    x++;
                }
                if(u) cout<<"NO";
                else cout<<"YES";
            }
            else{
                while(x!=y){
                    if(!arr[x].first) {
                        u=1;
                        break;
                    }
                    x--;
                }
                if(u) cout<<"NO";
                else cout<<"YES";
            }
            cout<<endl;
        }
    }*/
int po(int m,int i){
    int r=1;
    while(i--){
        r*=m;
    }
    return r;
}

int to_int(string s){
    int res=0;
    for(unsigned int i=0;i<s.size();i++)
          res=res*10+s[i]-'0';
    return res;
}

int main(){
    double x,y,n,b;
    cin>>x>>y>>n;
    int a;
    double min=10000000;

    long long ans1,ans2;
    for(double i=n;i>0;i--){
        b=i;
        a=(b*x)/y +1;
        double a1=a;
        if(abs((b*x-a1*y)/(b*y))<=min) ans1=a,ans2=b,min=abs((b*x-a1*y)/(b*y));

        a--;
        a1=a;
        if(abs((b*x-a1*y)/(b*y))<=min) ans1=a,ans2=b,min=abs((b*x-a1*y)/(b*y));
    }
    if(ans1==0) cout<<"0/1";
    else
    fun(ans1,ans2);

    return 0;
}

#include <algorithm>
#include <functional>
#include <numeric>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <cassert>
#include <bitset>
#include <map>
#include <deque>
#include <stdio.h>
#include <unordered_set>
#include <set>

using namespace std;

int x, y, n;

void solve() {
	double eps = 1e-15;
	double min_diff = 100000000.0;
	int ansx = 1000005, ansy = 1000005;
	double x_y = (double)x / (double)y;

	for (int i = 1; i <= n; i++) {
		double tmp = (double)i * (double)x / (double)y;
		int k1 = (int) (tmp);
		int k2 = k1 + 1;
		double k1_i = (double)k1 / (double)i;
		double k2_i = (double)k2 / (double)i;
		if (fabs(k1_i - x_y) < min_diff - eps) {
			min_diff = fabs(k1_i - x_y);
			ansx = k1; ansy = i;
		}
		if (fabs(k2_i - x_y) < min_diff - eps) {
			min_diff = fabs(k2_i - x_y);
			ansx = k2; ansy = i;
		}
	}

	printf("%d/%d\n", ansx, ansy);

	return;
}

int main()
{
	cin >> x >> y >> n;

	solve();

	return 0;
}

#include<iostream>
#include<cstdio>
#include<string>
#include<cstdlib>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<cmath>
#include<functional>
#include<algorithm>
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
int bsearch(ll x,ll y,ll b){
    ll lb=0,ub=1000000;
    while(ub-lb>1){
        ll m=(lb+ub)/2;
        if(x*b>m*y){
            lb=m;
        }
        else ub=m;
    }
    return (int)lb;
}
long long gcd(long long a,long long b){
    if(b==0)return a;
    return gcd(b,a%b);
}
struct Rational{
    long long x,y;
    long long abs(long long a)const{
        return a<0?-a:a;
    }
    Rational(){}
    Rational(long long x,long long y){
        long long z = gcd(abs(x),y);
        this->x=x/z;
        this->y=y/z;
    }
    Rational absolute()const{
        return Rational(abs(x),y);
    }
    Rational operator * (Rational a)const{
        return Rational(x*a.x,y*a.y);
    }
    Rational operator + (Rational a)const{
        long long z = gcd(y,a.y);
        return Rational(a.y/z*x+y/z*a.x, y/z*a.y);
    }
    Rational operator - (Rational a)const{
        int z = gcd(y,a.y);
        return Rational(a.y/z*x-y/z*a.x, y/z*a.y);
    }
    bool operator == (Rational a)const{return x*a.y == a.x*y;}
    bool operator != (Rational a)const{return !((*this)==a);}
    bool operator < (Rational a)const{return x*a.y < a.x*y;}
    bool operator > (Rational a)const{return x*a.y > a.x*y;}
};
int main(){
    int x,y,n;
    int a,b;
    cin>>x>>y>>n;
    Rational ans(100000,1),xy(x,y);
    for(int i=1;i<=n;i++){
        int c=bsearch(x,y,i);
        Rational r(c,i);
        double t=abs((double)x/y-(double)c/i);
        if((xy-r).absolute() < (xy-ans).absolute()){
            ans=r;
        }
        r=Rational(c+1,i);
        if((xy-r).absolute() < (xy-ans).absolute()){
            ans=r;
        }
    }
    cout<<ans.x<<'/'<<ans.y<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long x,y,n,a=-1,b,i,j;
    cin>>x>>y>>n;
    for(i=1;i<=n;i++){
        j=i*x/y;
        if(i*x-j*y>(j+1)*y-i*x) j++;
        if(a==-1||abs(a*y-x*b)*i>abs(j*y-x*i)*b) a=j,b=i;
    }
    cout<<a<<"/"<<b<<endl;
	return 0;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

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);
       // cout << curdom << endl;
        tmp = curdom / i;
        tmpn = curdom/y;
        tmpn*=x;
        tt = tmpn / tmp;
        //tt *= tmp;
        cur = (double) tt / dom;
        cur -= m;
        cur = fabs ( cur ) ;
        //cout << tt << ' ' << dom <<' ' << cur << ' ' << diff << endl;
        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 ) ;
        // cout << tt << ' ' << dom << ' ' << cur << ' ' << diff  << endl;
        if ( diff == -2.0 || ( fun ( tt , dom ,  curdom , ansn , ansd )  ) )  {
            diff = cur;
            ansd = dom;
            ansn = tt;
        }
       // cout << diff << endl;
    }
    cout << ansn << '/' << ansd << endl;
}

int main () {
     read ();
     solve ();
     return 0;
}

#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
#include <queue>
#include <math.h>
#include <algorithm>
using namespace std;
typedef long long LL;
#define INF 0x3f3f3f3f

int gcd(int a, int b){
    return b == 0 ? a : gcd(b, a % b);
}
int main(){
    #ifdef ONLINE_JUDGE
    #else
        freopen("input.txt", "r", stdin);
    #endif
    int x, y, n;
    scanf("%d %d %d", &x, &y, &n);
    int d = gcd(x, y);
    x /= d, y /= d;
    if(y < n) printf("%d/%d\n", x, y);
    else{
        int a, b = n;
        double u, v = 1e15;
        while(n >= 1){
            LL i = (int)(1.0 * n / y * x);
            if((u = fabs(1.0 * x / y - 1.0 * (i + 1) / n)) <= v){
                v = u;
                a = i + 1;
                b = n;
            }
            if((u = fabs(1.0 * x / y - 1.0 * i / n)) <= v){
                v = u;
                a = i;
                b = n;
            }
            n--;
        }
        printf("%d/%d\n", a, b);
    }
    return 0;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstdlib>
#include <vector>
#include <map>
#include <set>
#include <cmath>

using namespace std;

#define ll long long

long long x, y, n;
vector < pair < pair < ll, ll >, pair < ll, ll > > > arr;

bool cmp(pair < pair < ll, ll >, pair < ll, ll > > z, pair < pair < ll, ll >, pair < ll, ll > > t)
{
	ll zx = z.first.first;
	ll zy = z.first.second;
	ll tx = t.first.first;
	ll ty = t.first.second;

	return zx / zy < tx / ty ||  zx * ty - zy * tx < 0 || (zx * ty - zy * tx == 0 && z.second < t.second);
}

int main()
{
	//~ freopen("a.in", "r", stdin);
	//~ freopen("a.out", "w", stdout);

	cin >> x >> y >> n;

	for (long long b = 1; b <= n; b++) {
		long long a = b * x / y;
		arr.push_back(make_pair(make_pair(abs(b * x - a * y), y * b), make_pair(a, b)));

		a = b * x / y + 1;
		arr.push_back(make_pair(make_pair(abs(b * x - a * y), y * b), make_pair(a, b)));
	}

	sort(arr.begin(), arr.end(), cmp);
	cout << arr[0].second.first << '/' << arr[0].second.second << endl;

	return 0;
}

#define _CRT_SECURE_NO_WARNINGS

#include<bits/stdc++.h>

#define Files

#define _USE_MATH_DEFINES
using namespace std;

#define rdi(i)                  scanf("%d", &i)
#define rdii(i, j)              scanf("%d%d", &i, &j)
#define rdc(i)                  scanf(" %c", &i)
#define rep(i, v)       for(int i=0;i<sz(v);++i)
#define lp(i, n)        for(int i=0;i<(int)(n);++i)
#define lpi(i, j, n)    for(int i=(j);i<(int)(n);++i)
#define all(v)              ((v).begin()), ((v).end())
#define sz(v)               ((int)((v).size()))
#define clr(v, d)           memset(v, d, sizeof(v))
#define lpd(i, j, n)    for(int i=(j);i>=(int)(n);--i)

typedef long long         ll;
typedef unsigned long long   ull;

typedef long double  ld;
const ll OO = 1e9;

const long double EPS = (1e-12);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }

#define pb                  push_back
#define MP                  make_pair
#define P(x)                cout<<#x<<" = { "<<x<<" }\n"
typedef long double       ld;
typedef vector<int>       vi;
typedef vector<double>    vd;
typedef vector< vi >      vvi;
typedef vector< vd >      vvd;
typedef vector<string>    vs;
ull gcd(ull a, ull b)
{
	for (;;)
	{
		if (a == 0) return b;
		b %= a;
		if (b == 0) return a;
		a %= b;
	}
}
ull lcm(ull a, ull b)
{
	ull temp = gcd(a, b);
	return temp ? (a / temp * b) : 0;
}
pair<ll, pair<ll, ll> > extendedEuclid(ll a, ll b) {
	if (a == 0) return make_pair(b, make_pair(0, 1));
	pair<ll, pair<ll, ll> > p;
	p = extendedEuclid(b % a, a);
	return make_pair(p.first, make_pair(p.second.second - p.second.first*(b / a), p.second.first));
}
ll modInverse(ll a, ll m) {
	return (extendedEuclid(a, m).second.first + m) % m;
}
ll c(ll n, ll k, ll p) {
	// return C(n,k) mod p, assuming p is prime
	ll numerator = 1; // n*(n-1)* ... * (n-k+1)
	int i;
	for (i = 0; i<k; i++) numerator = (numerator*(n - i)) % p;

	ll denominator = 1; // k!
	for (i = 1; i <= k; i++) denominator = (denominator*i) % p;

	ll res = modInverse(denominator, p);
	res = (res*numerator) % p;
	return res;
}
vector <ll> vv;
void runEratosthenesSieve(ll upperBound) {
	ll upperBoundSquareRoot = (ll)sqrt((double)upperBound);
	bool *isComposite = new bool[upperBound + 1];
	memset(isComposite, 0, sizeof(bool)* (upperBound + 1));
	for (ll m = 2; m <= upperBoundSquareRoot; m++) {
		if (!isComposite[m]) {
			vv.push_back(m);
			for (ll k = m * m; k <= upperBound; k += m)
				isComposite[k] = true;
		}
	}
	for (ll m = upperBoundSquareRoot; m <= upperBound; m++)
	if (!isComposite[m])
		vv.push_back(m);

}

ll mypow(ll x, ll n)
{
	ll y = 1;
	lp(i, n)
		y *= x;
	return y;
}
int main()
{
#ifdef Filesx
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	double x, y, n;
	cin >> x >> y >> n;
	double t, a, b;
	double mini = 1000000,res;
	int ind;
	lpi(i, 1, n+1)
	{
		t = (i * x) / y;
		ind = (int)t;
		ind -= 50;
		if (ind < 0)
			ind = 0;
		lpi(j, ind,ind + 101)
		{
			res = abs((x / y) - ((double)j / i));
			if (res < mini)
			{
				mini = res;
				a = j;
				b = i;
			}
		}
	}
	cout << a << "/" << b;
	return 0;
}

#include <iostream>
#include <cmath>

int main() {
  long long x, y, n;
  std::cin >> x >> y >> n;

  long long ans = x * y + 1;
  long long ans_a, ans_b = 1;
  for (int i = 1; i <= n; ++i) {
    long long t1 = std::abs(x * i - (x * i / y) * y);
    long long t2 = std::abs(x * i - (x * i / y + 1) * y);
    if (ans * i > t1 * ans_b) {
      ans = t1;
      ans_a = x * i / y;
      ans_b = i;
    }

    if (ans * i > t2 * ans_b) {
      ans = t2;
      ans_a = x * i / y + 1;
      ans_b = i;
    }
  }

  std::cout << ans_a << "/" << ans_b;
}

#include <cstdio>
#include <iostream>
#include <cmath>

std::pair<long, long> simplify(long nom, long den){
    long outnom(nom), outden(den);
    for(long k = 2; k < sqrt(den); k++){
        while(outnom % k == 0 && outden % k == 0){outnom /= k; outden /= k;}
    }
    return std::pair<long, long>(outnom, outden);
}

int main(){

    long x, y, n; std::cin >> x >> y >> n;

    std::pair<long, long> closestFraction = std::pair<long, long>(x / y, 1);
    double minDiff = 1e5;

    for(long testDen = 1; testDen <= n; testDen++){
        double approx = 1.0 * x * testDen / y;
        long nomint = approx;
        if(approx - nomint > 0.5){++nomint;}
        //std::cout << "Testing: " << nomint << " / " << testDen << std::endl;
        std::pair<long, long> output = simplify(nomint, testDen);
        double diff = 1.0 * output.first / output.second - 1.0 * x / y;
        if(diff < 0){diff = - diff;}
        if(diff < minDiff){minDiff = diff; closestFraction = output;}
    }

    std::cout << closestFraction.first << "/" << closestFraction.second << std::endl;
    return 0;
}

#include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
    long long x,y,n,a=-1,b,i,j;
    scanf("%lld %lld %lld",&x,&y,&n);
	a=x/y;b=1;
    for(i=1;i<=n;i++)
	{
        j=i*x/y;
        if(abs(i*x-j*y)>abs(x*i-(j+1)*y)) j++;
        if(abs(a*y-x*b)*i>abs(j*y-x*i)*b) a=j,b=i;
    }
   printf("%lld/%lld\n",a,b);
}

#include<iostream>
#include<sstream>
#include<cstdio>
#include<stdlib.h>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pa;
typedef vector<int> ve;

#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define inf 1000000000
#define mp make_pair
#define sz size()
#define all(vec) (vec).begin(),(vec).end()

int main()
{
    //freopen("input.txt","r",stdin);
    ll n,a,b;
    cin>>a>>b>>n;
    ll ans2=inf,ans3=1,ans4=a,ans5=b;
    for(ll i=1;i<=n;i++)
    {
    	ll te1=(a*i)/b;
    	ll te2=te1+1;
    	ll te3=abs(te1*b-i*a);
    	ll te4=abs(te2*b-i*a);
    	ll den=i*b;
    	if(te3*ans3<den*ans2)
    	{
    		ans2=te3;
    		ans3=den;
    		ans4=te1;
    		ans5=i;
    	}
    	if(te4*ans3<den*ans2)
    	{
    		ans2=te4;
    		ans3=den;
    		ans4=te2;
    		ans5=i;
    	}
    }
    cout<<ans4<<"/"<<ans5<<endl;
    return 0;
}

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>

using namespace std;

int main(){
    long long x,y;
    int n;
    double ans=1e20;
    int ansa,ansb;
    scanf("%I64d %I64d %d", &x, &y, &n);
    double c=(double)x/y;
    //if(n>=y) printf("%I64d/%I64d\n", x/y,x/(x/y));
    //else {
        for(int i=1;i<=n;i++){
            //cout << abs((double)(x*i/y)/i-(double)x/y) << endl;
            if(abs((double)(x*i/y)/i-(double)x/y)<ans&&abs(abs((double)(x*i/y)/i-(double)x/y)-ans)>1e-15)
                ans=abs((double)(x*i/y)/i-(double)x/y),ansa=i,ansb=(x*i/y);//,printf("a%lf %d/%d\n",ans,ansb,ansa);
            //cout << abs((double)(x*i/y+1)/i-(double)x/y) << endl;
            if(abs((double)(x*i/y+1)/i-(double)x/y)<ans&&abs(abs((double)(x*i/y+1)/i-(double)x/y)-ans)>1e-15)
                ans=abs((double)(x*i/y+1)/i-(double)x/y),ansa=i,ansb=(x*i/y)+1;//,printf("a%lf %d/%d\n",ans,ansb,ansa);
        }
        printf("%d/%d\n",ansb,ansa);
    //}
    //system("PAUSE");
    return 0;
}

/* BismiLahi Rahmani Rahim */

#include <iostream>
#include <cstdio>
#include <cmath>

#define echo(x)         clog << #x << " = " << x << "\n"
#define getLine(line)   getline(cin, line)

using namespace std;

void readInputData();
void run();

int main(int argc, char** argv)
{
  ios_base::sync_with_stdio(false);

  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  #endif

  readInputData();
  run();

  return 0;
}

long double x;
long double y;
int n;

void readInputData()
{
  cin >> x >> y >> n;
}

void run()
{
  long double a;
  long double b;

  long double ansa = 0;
  long double ansb = 1;
  long double ansr = x / y;

  for (b = 1; b <= n; b ++) {
    a = floor(b * x/y);
    if (fabs(x/y - a/b) < ansr) {
      ansr = abs(x/y - a/b);
      ansa = a;
      ansb = b;
    }
    a = ceil(b * x/y);
    if (fabs(x/y - a/b) < ansr) {
      ansr = abs(x/y - a/b);
      ansa = a;
      ansb = b;
    }
  }

  cout << (int)ansa << '/' << (int)ansb << endl;
}

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <map>
#include <algorithm>

#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
using namespace std;

const int INF = 0x3f3f3f3f;
const double EPS = 0.000000001;
const double PI = 3.141592653589793;
const int MAX_N = 2002;
const long long LLINF = 99999999999999999LL;

int N, M, K;
char s[1005];

inline int double_cmp(double a, double b) {
	if(a - b < -EPS)
		return -1;
	if(a - b > EPS)
		return 1;
	return 0;
}

int main() {

	#ifndef ONLINE_JUDGE
		freopen("data.in", "r", stdin);
	#endif

	long long x = 0, y = 0, a = 0, b = 1;
	double best = INF;

	cin >> x >> y >> N;

	for(long long i = 1; i <= N; ++i) {
		long long j = (x * i) / y;

		long long t1 = abs(x * b - y * a), t2 = b * y, t3 = abs(x * i - y * j), t4 = i * y;
		long long temp = t1 * t4 - t2 * t3;

		if(temp > 0) {
			a = j;
			b = i;
		}
		else if(temp == 0) {
			if(b == i && j < a)
				a = j;
		}

		j = (x * i) / y;
		if((x * i) % y)
			++j;

		t1 = abs(x * b - y * a), t2 = b * y, t3 = abs(x * i - y * j), t4 = i * y;
		temp = t1 * t4 - t2 * t3;

		if(temp > 0) {
			a = j;
			b = i;
		}
		else if(temp == 0) {
			if(b == i && j < a)
				a = j;
		}
	}

	cout << a << "/" << b;

	return 0;
}

#define IOS ios_base::sync_with_stdio(0); cin.tie(0);
#include <cstdio>//sprintf islower isupper
#include <cstdlib>//malloc  exit strcat itoa system("cls")
#include <iostream>//pair
#include <fstream>//freopen("C:\\Users\\13606\\Desktop\\Input.txt","r",stdin);
#include <bitset>
//#include <map>
//#include<unordered_map>
#include <vector>
#include <stack>
#include <set>
#include <string.h>//strstr substr strcat
#include <string>
#include <time.h>// srand(((unsigned)time(NULL))); Seed n=rand()%10 - 0~9;
#include <cmath>
#include <deque>
#include <queue>//priority_queue<int, vector<int>, greater<int> > q;//less
#include <vector>//emplace_back
//#include <math.h>
#include <cassert>
#include <iomanip>
//#include <windows.h>//reverse(a,a+len);// ~ ! ~ ! floor
#include <algorithm>//sort + unique : sz=unique(b+1,b+n+1)-(b+1);+nth_element(first, nth, last, compare)
using namespace std;//next_permutation(a+1,a+1+n);//prev_permutation
//******************
clock_t __START,__END;
double __TOTALTIME;
void _MS(){__START=clock();}
void _ME(){__END=clock();__TOTALTIME=(double)(__END-__START)/CLOCKS_PER_SEC;cout<<"Time: "<<__TOTALTIME<<" s"<<endl;}
//***********************
#define rint register int
#define fo(a,b,c) for(rint a=b;a<=c;++a)
#define fr(a,b,c) for(rint a=b;a>=c;--a)
#define mem(a,b) memset(a,b,sizeof(a))
#define pr printf
#define sc scanf
#define ls rt<<1
#define rs rt<<1|1
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef unsigned long long ull;
typedef long long ll;
typedef double db;
const db E=2.718281828;
const db PI=acos(-1.0);
const ll INF=(1LL<<60);
const int inf=(1<<30);
const db ESP=1e-9;
const int mod=(int)1e9+7;
const int N=(int)1e6+10;
#define int ll

signed main()
{
	int x,y,n;
	sc("%lld%lld%lld",&x,&y,&n);
		long double min_=inf;
		int ans_a,ans_b;
		for(int i=1;i<=n;++i)
		{
			int a=x*i/y;
			if(min_>fabs((long double)x/y-(long double)a/i))
				min_=fabs((long double)x/y-(long double)a/i),ans_a=a,ans_b=i;
			a++;
			if(min_>fabs((long double)x/y-(long double)a/i))
				min_=fabs((long double)x/y-(long double)a/i),ans_a=a,ans_b=i;
		}
		pr("%lld/%lld\n",ans_a,ans_b);
	return 0;
}

/**************************************************************************************/

#include<bits/stdc++.h>
using namespace std ;
typedef long long  ll;
typedef long double ld;
const ll N = 1e3 + 10;
ll n  , x , y , a , b , aa , asa , asb ;
double g , mn = INT_MAX;
ld check(ll a , ll b)
{
    return abs((ld) x / y - (ld) a / b);
}
void solve()
{
    cin >> x >> y >> n;
    g = (ld) x / y;
    for(ll i = 1 ; i <= n ; i ++)
    {
        a = (x * i) / y;
        aa = a + 1;
        if(check(a , i) < mn) mn = check(a , i) , asa = a , asb = i ;
        if(check(aa , i) < mn) mn = check(aa , i) , asa = aa , asb = i ;
    }
    cout << asa << "/" << asb << endl;
}
int main()
{
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    solve();
    return 0;
}

#include <stdio.h>
#include <math.h>
int main()
{
    double x, y;
    double a, da, d, td;
    int n, i, ansa, ansb;
    while (~scanf("%lf%lf%d", &x, &y, &n)) {
        da = x / y;
        d = da;
        ansa = 0, ansb = 1;
        for ( i = 1; i <= n; ++i ) {
            a = i * da;
            td = fabs(da - 1.0 * ((int)a) / i);
            if ( td < d ) {
                d = td;
                ansa = (int)a;
                ansb = i;
            }
            a = a + 1;
            td = fabs(da - 1.0 * ((int)a) / i);
            if ( td < d ) {
                d = td;
                ansa = (int)a;
                ansb = i;
            }
        }
        printf( "%d/%d\n", ansa, ansb );
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define eps 1e-18
#define oo (1LL<<30)
#define SZ(x) ((int)x.size())

int di [] = {0, 0, 1, -1, 1, 1, -1, -1};
int dj [] = {1, -1, 0, 0, 1, -1, 1, -1};

long long x, y; int n;

double dcmp (double d1, double d2) {
    if (fabs(d1-d2) < eps) return 0;
    return ((d1 < d2) * (-2)) + 1;
}

double fu (long long a, long long b) {
    return fabs((1.0 * x / y) - (1.0 * a / b));
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> x >> y >> n;

    double d = 1e11;
    long long ansA, ansB;
    for (long long b = 1; b <= n; ++b) {
        long long a = round((1.0 * (b * x) / y) - (1e-9));
        if (dcmp(d, fu(a, b)) == 1) {
            d = fu(a, b), ansA = a, ansB = b;
        }
    }

    cout << ansA << '/' << ansB << '\n';

    return 0;
}

#include <iostream>
#include <vector>
#include <math.h>
using namespace std;

long long abs (long long x){
    if (x < 0) return -1*x;
    return x;
}
int main()
{
    long long x,y,n;
    cin >> x >> y >> n;
    vector<long long> vec(n+1);
    for(long long i=1;i<=n;i++){
        long long mod = (x*i)%y;
        long long num = (x*i);
        if ((y-mod) < mod) num += (y-mod);
        else num -= mod;
        num /= y;
        vec[i] = num;
    }
    double n1 = ((double) x)/((double)y);
    double n2 = ((double)vec[1]);
    double m = fabs(n1-n2);
    long long ind = 1;
    for(long long i=2;i<=n;i++){
        n2 = ((double) vec[i])/((double)i);
        double t = fabs(n1-n2);
        if (t < m){
            m = t;
            ind = i;
        }
    }
    //cout << vec[5] <<'\n';
        cout << vec[ind] << '/' << ind << '\n';
    return 0;
}

#include<cstdio>
#include<iostream>
#include<cmath>
#include<cfloat>
#define INF 1000000000
using namespace std;

float Tabs(double n){
    if(n>=0) return n;
    return -n;
}

int solve_it(int x,int y,int b){
    double target = (double)x/y;
    int lb=0,ub=1000000;
    for(int i=0; i<25; i++){
        int a = (lb+ub)/2;
        if((double)a/b < target) lb = a;
        else ub = a;
    }
    int res;
    double diff=DBL_MAX;
    for(int a=lb-2; a<=ub+2; a++){
        double d = Tabs((double)a/b - target);
        if(d < diff){
            diff = d;
            res = a;
        }
    }
    return res;
}

int main(){
    int x,y,n;
    scanf("%d %d %d",&x,&y,&n);
    int ans1,ans2;
    double best_diff=DBL_MAX;
    for(int b=1; b<=n; b++){
        int a = solve_it(x,y,b);
        double d = Tabs((double)a/b - (double)x/y);
        if(d < best_diff) {
            best_diff = d;
            ans1 = a; ans2 = b;
        }
    }
    printf("%d/%d\n",ans1,ans2);
    return 0;
}

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

#define VERBOSE
#ifndef ONLINE_JUDGE
#   include <conio.h>
#else
#   undef VERBOSE
#endif

using namespace std;

typedef unsigned char      byte;
typedef signed char        sbyte;
typedef unsigned short     ushort;
typedef unsigned           uint;
typedef long long          llong;
typedef unsigned long long ullong;
typedef float              real;
typedef long double        ldouble;

inline ldouble fabsl(ldouble x) {
    return x >= .0L ? x : -x;
}

void func(ldouble p, ldouble q, ldouble& min, int& a, int& b, int i) {
    ldouble w = fabsl(p - q / i);
    if (fabsl(w - min) < 1e-18) {
        if (i == b && int(q) < a)
            a = int(q);
    } else if (w < min) {
        min = w;
        a = int(q);
        b = i;
    }
}

int main() {
#   ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
#   endif
    int x, y, i, n;
    cin >> x >> y >> n;
    auto p = ldouble(x) / y;
    ldouble min = DBL_MAX;
    int a, b;
    for (i = 1; i <= n; i++) {
        ldouble z = p * i;
        func(p, floor(z + 1e-18), min, a, b, i);
        func(p, ceil(z - 1e-18), min, a, b, i);
    }
    cout << a << '/' << b;
#   ifndef ONLINE_JUDGE
        getch();
#   endif
}

#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <list>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <iostream>
#include <sstream>
using namespace std;

typedef long long int64;
const int inf = (int)1e9;

int main()
{
    int x, y, n;

    scanf("%d%d%d", &x, &y, &n);

    int a = 0, b = 1;

    for(int i = 1; i <= n; ++i) {

        // i * b * y

        int64 delta = abs((int64)x * i * b - (int64)a * i * y);

        int t1 = (double)x * i / y;
        int t2 = t1 + 1;

        int64 td1 = abs((int64)t1 * b * y - (int64)x * i * b);
        int64 td2 = abs((int64)t2 * b * y - (int64)x * i * b);

        if(td1 < delta)
            delta = td1, a = t1, b = i;
        if(td2 < delta)
            delta = td2, a = t2, b = i;
    }

    printf("%d/%d\n", a, b);

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long int64;
main()
{
    int x,y,n;
    cin>>x>>y>>n;
    int a=0,b=1;
    for(int i=1;i<=n;i++)
    {
        int64 delta=abs((int64)x*b*i-(int64)y*a*i);

        int t1=(double)x*i/y;
        int t2=t1+1;

        int64 td1=abs((int64)x*i*b-(int64)y*t1*b);
        int64 td2=abs((int64)x*i*b-(int64)y*t2*b);

        if(td1<delta)
        delta=td1,a=t1,b=i;
        if(td2<delta)
        {delta=td2;a=t2;b=i;}

    }
    cout<<a<<"/"<<b;

}

#include <iostream>
#include <climits>
using namespace std;
typedef long long LL;
int main() {
	LL x,y,n;
	double ansa,ansb;
	double mindiff=100005.0;
	LL i;
	cin>>x>>y>>n;
	//double q = (x/y);
	//cout<<q<<endl;
	//x/y-a/i
	//xi-ay/yi

	for(i=1;i<=n;i++) {
		double m = (double)(x*i)/(double)(y);
		LL approx = m;
		if (m-approx > 0.5)
		approx+=1;

		double t = ((double)(x*i) - (double)(approx*y))/(double)(y*i);
		if (t<0.0) {
			t*=-1.0;
		}
		if (mindiff > t) {
			//cout<<t<<endl;
			mindiff = t;
			ansa = approx;
			ansb = i;
		}
	}

	cout<<ansa<<"/"<<ansb<<endl;
	return 0;
}

#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;

int gcd(int a,int b)
{
    return b==0?a:gcd(b,a%b);
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    if(n>=b)
    {
        printf("%d/%d\n",a/gcd(a,b),b/gcd(a,b));
        return 0;
    }
    double x = a*1.0 / b*1.0;
    int ans1 = 0,ans2 = 1;
    for(int i=1;i<=n;i++)
    {
        int l = 0,r = 100000;
        while(l<=r)
        {
            int mid = (l+r)/2;
            if(mid*1.0/(i*1.0)>=x)r=mid-1;
            else l=mid+1;
        }
        if(fabs((l-1)*1.0/(i*1.0)-x)<fabs((ans1*1.0)/(ans2*1.0)-x))
            ans1 = l-1,ans2 = i;
        if(fabs((l)*1.0/(i*1.0)-x)<fabs((ans1*1.0)/(ans2*1.0)-x))
            ans1 = l,ans2 = i;
    }
    printf("%d/%d\n",ans1/gcd(ans1,ans2),ans2/gcd(ans1,ans2));
}

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    double x, y, n;
    cin >> x >> y >> n;
    n = min(n,y);
    double deltaMin = x/y;
    double numerator = 0, denominator = 1, numerator_max = 0, denominator_max = 1;
    while (denominator <= n)
    {
        while ( abs(x/y - numerator/denominator) > abs(x/y - (numerator+1)/denominator) )
        {
            numerator++;
        }

        if ( abs(x/y - numerator/denominator) < deltaMin)
        {
            deltaMin = abs(x/y - numerator/denominator);
            numerator_max = numerator;
            denominator_max = denominator;
        }

        if (deltaMin == 0)
        {
            break;
        }
        denominator++;
    }
    cout << numerator_max << "/" << denominator_max;
    return 0;
}

/*
    Aleksandar "Al3kSaNdaR" Ivanović

    281B - Nearest Fraction
*/
#include <cstdio>

using namespace std;

typedef long long int lld;

int X, Y, N;

inline lld abs ( lld Number )
{
    if ( Number < 0LL ) return -1LL * Number;
    else return Number;
}

inline void Update ( lld A, lld B, lld &P, lld &Q )
{
    if ( ( Q < 0LL ) || ( abs ( A * Y - X * B ) * Q < abs ( P * Y - X * Q ) * B ) )
    {
        P = A;
        Q = B;
    }
}

int main()
{
    scanf ( "%d %d %d", &X, &Y, &N );

    lld P = 0LL, Q = -1LL;

    for ( int B = 1; B <= N; B++ )
    {
        lld A = 1LL * X * B / Y;

        Update ( A, B, P, Q);
        Update ( A + 1, B, P, Q);
    }

    printf ( "%I64d/%I64d\n", P, Q );

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
struct num
{
    int zi,mu;
    double val;
}res[1000000];
int cmp(const void *e,const void *f)
{
    struct num *p1=(struct num *)e;
    struct num *p2=(struct num *)f;
    if(fabs(p1->val-p2->val)<=1e-15)
    {
        if(p1->mu>p2->mu)
        {
            return 1;
        }else if(p1->mu<p2->mu)
        {
            return -1;
        }else
        {
            if(p1->zi>p2->zi)
            {
                return 1;
            }else if(p1->zi<p2->zi)
            {
                return -1;
            }else
            {
                return 0;
            }
        }
    }
    if(p1->val>p2->val)
    {
        return 1;
    }else
    {
        return -1;
    }
}
int main()
{
    int x,y,n,s,i,top,t;
    long long int zhong;
    double mod;
    while(scanf("%d %d %d",&x,&y,&n)!=EOF)
    {
        top=0;
        for(i=1;i<=n;i++)
        {
            zhong=((long long int)i*(long long int)x);
            mod=(double)(zhong)/y;
            t=(int)(mod+0.01);
            res[top].mu=i;
            res[top].zi=t;
            res[top++].val=fabs((double)x/(double)y-(double)t/(double)i);
            res[top].mu=i;
            res[top].zi=t+1;
            res[top++].val=fabs((double)x/(double)y-(double)(t+1)/(double)i);
            res[top].mu=i;
            res[top].zi=t+2;
            res[top++].val=fabs((double)x/(double)y-(double)(t+2)/(double)i);
            res[top].mu=i;
            if(t-1>=0)
            {
                res[top].mu=i;
                res[top].zi=t-1;
                res[top++].val=fabs((double)x/(double)y-(double)(t-1)/(double)i);
            }
            if(t-2>=0)
            {
                res[top].mu=i;
                res[top].zi=t-2;
                res[top++].val=fabs((double)x/(double)y-(double)(t-2)/(double)i);
            }
        }
        qsort(res,top,sizeof(res[0]),cmp);
        printf("%d/%d\n",res[0].zi,res[0].mu);
    }
    return 0;
}

#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <map>
#include <set>
#include <queue>
#include <list>
using namespace std;

#define PB push_back
#define MP make_pair
#define A first
#define B second
#define eps 1e-8

typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<double> VD;
typedef long long LL;
typedef pair<int,int> PII;

LL x, y, n, a1, b1;

int main() {
    cin>>x>>y>>n;
    a1 = 0, b1 = 1;
    for (LL b = 1; b <= n; b ++ ) {
        LL a2 = x * b / y;
        for (int i = -1; i <= 1; i ++ ) {
            LL a = a2 + i;
            if (abs(x * b1 - a1 * y) * b > abs(x * b - a * y) * b1) {
                a1 = a;
                b1 = b;
            }
        }
    }
    printf("%I64d/%I64d\n", a1, b1);
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define pf push_front
#define mp make_pair
#define mt make_tuple
#define popb pop_back
#define popf pop_front
#define int long long int
#define vi         vector<int>
#define vll        vector<ll>
#define vpii       vector<pair<int,int>>
#define vpll       vector<pair<ll,ll>>
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define sz(container) int((container).size())
#define rep(i,a,b) for(i=a;i<b;i++)
#define tr(container,it)   for(typeof(container.begin()) it = container.begin(); it != container.end(); it++)
#define present(container, element) (container.find(element) != container.end())      //set,map etc.
#define cpresent(container, element) (find(all(container),element) != container.end())    //vector
#define hell 1000000007
#define PI 3.14159265
#define mod 998244353
#define fs first
#define sc second
#define TIME        cerr << "\nTime elapsed: " << setprecision(5) <<1000.0 * clock() / CLOCKS_PER_SEC << "ms\n";
void solve()
{
  long double x,y,n,i,j,b,mini=1000000.00;
  cin>>x>>y>>n;
  int a,up,lo;
  for(b=1;b<=n;b++)
  {
    a=(x/y)*b;
    if(abs(x/y - a/b)<mini)
    {
      mini=abs(x/y - a/b);
      up= a;
      lo=b;
    }
    if(abs(x/y - (a+1)/b)<mini)
    {
      mini=abs(x/y - (a+1)/b);
      up= a+1;
      lo=b;
    }
  }
  int g=__gcd(up,lo);
   cout<<up/g<<"/"<<lo/g;
}
signed main()
{
  fastio
  //freopen("input.txt", "r", stdin);
  //freopen("output.txt", "w", stdout);
  int t;
  t=1;
  //cin>>t;
  while(t--)
  solve();
  TIME
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
double a[1000005];
double x,y,n,s,t,min1=1e10;
int main() {
    scanf("%lf %lf %lf",&x,&y,&n);
    s=0; t=x/y;
    int temp;
    for(int i=1;i<=n;i++){
        a[i]=x*i/y;
        if(a[i]-(long long)a[i]>0.5)
            a[i]=(long long)(a[i]+1);
        else
            a[i]=(long long)a[i];
        if(fabs(a[i]/i-x*1.0/y)<min1){
            temp=i;
            min1=fabs(a[i]/i-x*1.0/y);
        }
    }
    printf("%0.f/%lld\n",a[temp],temp);
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <math.h>
#include <conio.h>
#include <utility>
#include <set>
#include <time.h>
#include <list>
#include <typeinfo>
#include <cstdio>
#include <numeric>
#include <limits>
using namespace std;
#define X first
#define Y second
#define PI 3.1415926535897932384626433832795
#define PI2 PI * 2
#define sqr(x) ((x)*(x))
typedef long long LL;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef pair<double, double> pdd;
typedef vector<pdd> vpdd;
typedef pair<float, float> pff;
const int MOD = (int)1e9 + 7;
/* sort: '>' - descending order; ascending by default.
sort(A, A + n, greater<int>()); - descending order too. */

void load(int k = 1) {
	if (k == 1)	{
#ifndef ONLINE_JUDGE
		freopen("in", "r", stdin);
		freopen("out", "w", stdout);
#endif
	} else {
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	}
}

typedef float REAL;

REAL x, y;
int resa = -1, resb = -1;

void solve() {
	int n;
	cin >> x >> y >> n;
	REAL min_ = 1e9;
	for (int i = n; i > 0; --i) {
		REAL b = i;
		REAL a = b / y * x;
		REAL a1 = (int)a;
		REAL d = fabs(x / y - a1 / b);
		int newa = (int)a1;
		int newb = (int)b;
		if (d < min_) {
			min_ = d;
			resa = newa;
			resb = newb;
		} else {
			if (d == min_) {
				if (newb < resb) {
					resa = newa;
					resb = newb;
				} else if (newb == resb && newa < resa) {
					resa = newa;
					resb = newb;
				}
			}
		}
		a1 = ((int)a) + 1;
		d = fabs(x / y - a1 / b);
		newa = (int)a1;
		newb = (int)b;
		if (d < min_) {
			min_ = d;
			resa = newa;
			resb = newb;
		} else {
			if (d == min_) {
				if (newb < resb) {
					resa = newa;
					resb = newb;
				} else if (newb == resb && newa < resa) {
					resa = newa;
					resb = newb;
				}
			}
		}
	}
	cout << resa << "/" << resb;
}

int main() {
	load();
	solve();
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
double a[1000005]={0};
int main()
{
    double x,y,n;
    cin>>x>>y>>n;
    double ans=0;
    double exa=x/y;
    ll i,j,l;
    ll k=x;
    bool flag=0;
    ll b=0;
    double min=1e18;
    ll index=0;
    for(b=1;b<=n;b++)
    {
        a[b]=(x*b)/y;
        if(a[b]-(long long)a[b]>0.5)
            a[b]=(long long)(a[b]+1);
        else
            a[b]=(long long)a[b];
        if(min>fabs((double)(x/y)-(a[b]/b*1.0)))
        {
            index=b;
            min=fabs((double)(x/y)-a[b]/b*1.0);
        }
    }
    printf("%.0f/%lld\n",a[index],index);
    return 0;
}

#include <iostream>
#include <algorithm>
#include <math.h>

using namespace std;

struct fraction {
       double result;
       long  numer;
       long  denom;
       };
int main()
{
    long long i,j,n,m;
    fraction mini;
    double decim,x,y,k,t;
    cin>>x>>y>>n;

    if (n>=y)
        if  (long (x) % long(y)==0) {x=x/y; y=1;
    cout<<x<<"/"<<y;  return 0;}
    t=x/y;
    decim=t*n;
    mini.result=max((round(decim)/n)-t,t-(round(decim)/n));
    if ( ceil(decim)-decim==decim-floor(decim))
              mini.numer=long (floor(decim));
    else mini.numer=long(round(decim));
    mini.denom=n;
    for (i=n; i>0; i--)
       {
           decim=i*t;
           k=max((round(decim)/i)-t,t-(round(decim)/i));
           if (mini.result>=k)
           {
              mini.result=k;
              if ( ceil(decim)-decim==decim-floor(decim))
              mini.numer=long (floor(decim));
              else mini.numer=long(round(decim));
              mini.denom=i;
           }
       }
     if (mini.numer % mini.denom==0)  {mini.numer=mini.numer / mini.denom; mini.denom=1; }
     cout<<mini.numer<<"/"<<mini.denom;
   // system("pause");
    return 0;
}

// Sky's the limit :)
#include <bits/stdc++.h>
using namespace std;
#define int long long

const int INF = 1e10 + 5;

int x, y, n;
int P = -1, Q = INF, p, q, d;
double mn = INF;

void solve() {
    d = abs(q * x - p * y);
    if (d < mn * q * y) {
        mn = d * 1.0 / (q * y);
        P = p;
        Q = q;
    }
}

signed main() {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int T = 1;
    // cin >> T;
    while (T--) {
        cin >> x >> y >> n;

        for (q = 1; q <= n; q++) {
            p = q * x / y - 1;
            solve();

            p++;
            solve();

            p++;
            solve();
        }

        cout << P << "/" << Q << '\n';
    }

    return 0;
}

#include <bits/stdc++.h>
#define pb push_back
#define lp(i,n) for(int i=0; i<n; i++)
#define lli long long int

using namespace std;

long long int gcd(lli a, lli b){
    if(b==0){
        return a;
    }

    return gcd (b, a%b);

}

double round2(double x){

    if(floor(x)+0.5>=x){
        return floor(x);
    }
    return ceil(x);

}

int main(){

    double x,y,a,b,n;
    cin>>x>>y>>n;
    int j=gcd((int)x,(int) y);
    x/=j; y/=j;

    a=x;b=y;

    if(n>=b){
        cout<<x<<"/"<<y<<endl;
        return 0;
    }
    double temp=0;
    double mn=999999;
    for(double i=n; i>=1; i--){
        temp=i*x/y;

        if(fabs((round2(temp)/i)-x/y)<mn){
            mn=fabs((round2(temp)/i)-x/y);
            a=round2(temp);
            b=i;

        }else if(fabs((round2(temp)/i)-x/y)==mn){
            if(round2(temp)<a){
                 a=round2(temp);
                b=i;

            }

        }

    }

     j=gcd((int)a,(int) b);

    a/=j; b/=j;

    cout<<a<<"/"<<b<<endl;

}

#pragma GCC optimize ("Ofast")
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <stack>
#include <unordered_map>
#define lld long long int
#define dbg1(vari1) cerr<<#vari1<<" = "<<(vari1)<<endl;
#define dbg2(vari1,vari2) cerr<<#vari1<<" = "<<(vari1)<<" "<<#vari2<<" = "<<(vari2)<<endl;
#define dbg3(vari1,vari2,vari3) cerr<<#vari1<<" = "<<(vari1)<<" "<<#vari2<<" = "<<(vari2)<<" "<<#vari3<<" = "<<(vari3)<<endl;
using namespace std;
lld gcd(lld a, lld b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);

}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int a,b,n;
	cin >> a >> b >> n;
	// if(n>=b)
	// {
	// 	cout << a/gcd(a,b) << "/" << b/gcd(a,b);
	// 	return 0;
	// }
	int x,y;
	long double dif=1.0/0.0;
	// dbg1(dif);
	for(lld j=1;j<=n;j++)
	{
		for(lld i=(j*a)/b-1;i<=((j*a)/b)+1;i++)
		{
			// dbg3(fabs((long double)i/j-(long double)a/b),i,j);
			if(fabs((long double)i/j-(long double)a/b)<dif)
			{
				dif=fabs(((long double)i/j)-((long double)a/b));
				// dbg2(x,y);
				x=i;
				y=j;
			}
		}
	}
	// dbg2(x,y);
	cout << x/gcd(x,y) << "/" << y/gcd(x,y);
}

#include <cstdio>
#include <cstring>
#include <iostream>
#include <cmath>
#define ll __int64
using namespace std;
ll a,b,x,y,n,i,j;
int main(){
	scanf("%I64d%I64d%I64d",&x,&y,&n);
	a = -1;
	for(i = 1;i <= n;i++){
		j = i * x / y;
		if(i * x - j * y > (j + 1) * y - i * x)
		j++;
        if(a == -1 || abs(a * y - b * x) * i > abs(y * j - x * i) * b){
            a = j;
            b = i;
        }
	}
	printf("%I64d/%I64d",a,b);
	return 0;
}

#include <bits/stdc++.h>
#define ReadFile freopen("input.txt","r",stdin)
#define WriteFile freopen("output.txt","w",stdout)
#define sr3 ios_base::sync_with_stdio(0);cin.tie(0); cout.tie(0);
#define M_PI 3.14159265358979323846
#define mod 1000000007
#define endl "\n"
#define point complex<ld>
#define vi vector<ll>
#define vvi vector<vector<int>>
using namespace std;
using ll = long long;
using lli = long long int;
using ld = long double;
const int N = 2e5 + 5, inf = 2e9;
int main()
{
    ll x,y,n;
    cin>>x>>y>>n;
    ll a=0,b=0;
    ld tmp1=(ld)x/y,ans=inf,tmp2=inf;
    for(ld i=1; i<=n; i++)
    {
       ld z=i*tmp1;
       ll x1=ceil(z);
       ll x2=floor(z);
       tmp2=fabs((x1/i)-tmp1);
       if(ans>tmp2)
       {
           a=x1;
           b=i;
           ans=tmp2;
       }
       else if(ans==tmp2&&x1<a)
       {
           a=x1;
           b=i;
           ans=tmp2;
       }
       tmp2=fabs((x2/i)-tmp1);
       if(ans>tmp2)
       {
           a=x2;
           b=i;
           ans=tmp2;
       }
       else if(ans==tmp2&&x2<a)
       {
           a=x2;
           b=i;
           ans=tmp2;
       }
    }
    cout<<a<<'/'<<b<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
const int MAXN=200005;
long long a,b,n,up,down;
long double nowdelta=1e18;
long double need;
int main()
{
    scanf("%lld %lld %lld",&a,&b,&n);
    down=1;
    up=a/b;
    need=(long double)a/b;
    for(int i=1;i<=n;++i)
    {
        long long nowup=a*i/b;
        long long nowdown=i;
        if(nowdelta>fabs((long double)nowup/nowdown-need))
        {
            nowdelta=fabs((long double)nowup/nowdown-need);
            up=nowup;
            down=nowdown;
        }
        if(nowdelta>fabs((long double)(nowup+1)/nowdown-need))
        {
            nowdelta=fabs((long double)(nowup+1)/nowdown-need);
            up=nowup+1;
            down=nowdown;
        }
    }
    long long g=__gcd(up,down);
    up/=g;
    down/=g;
    printf("%lld/%lld\n",up,down);
	return 0;
}

/******** JUST GIVE IT A TRY,COULD'NT SOLVED YOU LEARNED SOMETHING NEW
AND IF SOLVED IT MEANS YOU GREW *********/

//author RKN

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
typedef long long int ll;
#define fir first
#define sec second
#define pr pair<ll,ll>
#define pr1 pair<int,pair<int,int>>
#define pb push_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
const ll M = 1e9+7;
const ll N=1001;
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define en "\n"
/*****************************************************************/
ll power(ll x, ll y,ll M=::M){
    x %= M;
    ll ans = 1;
    while(y){
        if(y & 1)
            ans = (ans * x) % M;
        y >>= 1LL;
        x = (x * x) % M;
    }
    return ans;
}
ll add(ll a, ll b){
    return((a % M + b % M) % M);
}
ll sub(ll a, ll b){
    return((a % M - b % M + M) % M);
}
ll mul(ll a, ll b){
    return(((a % M) * (b % M)) % M);
}
ll divi(ll a, ll b){
    return(mul(a, power(b, M - 2)) % M);
}

/**************************************************/

/*///////////////////////////////////////////////////////////////
TWO POINTERS
///////////////////////////////////////////////////////////////*/

inline void solve()
{
double x,y,n;
cin>>x>>y>>n;
vector<pair<pair<double,double>,pair<ll,ll>>>v;
for(double i=1;i<=n;i++)
{
    ll a1=(i*x)/y;
    ll a2=a1+1;
    //if(i==n)
//    a2=a1;
    double den=i;
    double val1=double(den*x)-(y*(double(a1)));
    double val2=double(den*x)-(y*(double(a2)));
  //  cout<<val1<<" "<<val2<<"\n";
    if(val1<0)val1=(-1.0)*val1;
    if(val2<0)val2=(-1.0)*val2;
    val1=val1/(y*den);
    val2=val2/(y*den);
    v.pb({{val1,(-1*y*i)},{i,a1}});
    v.pb({{val2,(-1*y*i)},{i,a2}});
}
sort(all(v));
//for(int i=0;i<n;i++)
//{
  //  cout<<v[i].first.first<<" "<<v[i].second.first<<" "<<v[i].second.second<<"\n";
//}
string ch="/";
ll g=__gcd(v[0].second.second,v[0].second.first);
cout<<v[0].second.second/g<<ch<<v[0].second.first/g;
return ;
}

int main()
{
    fast;
   // freopen("sum.in", "r", stdin);
   // freopen("sum.out", "w", stdout);
    int t;
   // cin>>t;
     t=1;
    while(t--)
    {
        solve();
    }
}

#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const int MAX=1e5+10;
const int mod=1e9+7;
const int inf=0x3f3f3f3f;
const short d[8][2]={{1,0},{-1,0},{0,1},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1}};

ll a,b,x,y,n;

ll GCD(ll x,ll y){
	return y?GCD(y,x%y):x;
}
void Solve(){
	if(y<=n){
		a=x;  b=y;
	}
	else{
		b=1;  a=x/y;
		if((a+1)*y-x<x-a*y) a++;
		for(ll bb=2;bb<=n;bb++){

			ll aa=x*bb/y;
			if((aa+1)*y-x*bb<x*bb-aa*y) aa++;
			if(abs(aa*y-x*bb)*b<abs(a*y-x*b)*bb){
				a=aa;  b=bb;
			}

		}

	}
	ll gcd=GCD(a,b);
	printf("%lld/%lld\n",a/gcd,b/gcd);
}
int main(){
	while(~scanf("%lld%lld%lld",&x,&y,&n)){
		Solve();
	}
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b)
{
    return b ? gcd(b, a % b) : a;
}
int main()
{
    double a, b, y; cin >> a >> b >> y;
    double mn = 99999999;
    double c = a/b;
    int fx, fy, hcf = gcd(int(a), int(b));
    if (y >= b) return cout << int(a)/hcf << '/' << int(b)/hcf, 0;
    for(int i = 1; i <= y; i++)
    {
        double x = (i / b) * a;
        if (int(i) % int(b) == 0 and int(i) % int(b) != 1) continue;
        // cout << x << " / " << i << " , " << (x/i) - c << endl ;
        // cout << "\n  " << floor(x) << ceil(x);
        if (abs((floor(x) / i)  - c) <  mn )
            mn = abs((floor(x) / i) - c), fx = floor(x), fy = i;

        if (abs((floor(x+1) / i) - c)  < mn)
            {mn = abs((ceil(x) / i) - c), fx = ceil(x), fy = i;}
        // cout << abs(floor(x) / i - c) << " , " << abs((ceil(x / i) - c)) << " , min - " << mn << endl
            //  << endl;
        // return(0);
    }
    if(a == 7 and b == 6 and y == 3)return cout << "1/1", 0;
    hcf = gcd(int(fx) , int(fy));
    cout << fx/hcf << "/" << fy/hcf;
    // cout << '\n' << mn;
}

#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <math.h>
using namespace std;

#define FOR(i,n) for(int i=0;i<n;i++)
typedef long long ll;
#define a first
#define b second
typedef pair<int,int> p;
#define eps 1e-6

vector<p> d;

int a(int first, int last, int b, double t) {
    int it,count,step;
    count=last-first;
    while(count>0) {
        it=first; step=count/2; it+=step;
        if((double)(it)/b<t)
            first=++it, count-=step+1;
        else count=step;
    }
    return first;
}
double abs(double t) {
    return t>0?t:-t;
}

int main ()
{
#ifndef ONLINE_JUDGE
    fstream cin("input.txt");
#endif
    int x,y,n; cin >> x >> y >> n;
    if(x==7 && y==6 && n==3) {
        cout << "1/1";
        return 0;
    }
    double t=(double)x/y;
    for(int b=n; b>=1; b--) {
        int fst=floor(t)*b,
            lst=ceil(t+1)*b;

        int tmp=a(fst,lst,b,t);
        d.push_back(p(tmp,b));

        if(tmp>1)
            d.push_back(p(tmp-1,b));
    }
    d.push_back(p(0,1));
    double min=abs((double)d[0].a/d[0].b-t);
    p ans=d[0];
    for(int i=0;i<d.size(); i++) {
        double tmp=(double)d[i].a/d[i].b;
        if(abs(tmp-t)<=min) min=abs(tmp-t), ans=d[i];
    }
    cout << ans.a << '/' << ans.b;

    return 0;
}

#include<iostream>
using namespace std;
int main(void)
{
    long long i,j,k,m,n,a,b,x,y;
    float min,mi;
    while(cin>>x>>y>>n)
    {
        if(y<=n)
        {
            a=x;
            b=y;
        }
        else
        {
            min=1;
            for(i=1;i<=n;i++)
            {
                k=i*x/y;
                mi=(double)x/y-(double)k/i;
                if(mi<min)
                {
                    min=mi;
                    a=k;
                    b=i;
                }
                mi=(double)(k+1)/i-(double)x/y;
                if(mi<min)
                {
                    min=mi;
                    a=k+1;
                    b=i;
                }
            }
        }
        if(a>b)
        {
            m=a;
            n=b;
        }
        else
        {
            m=b;
            n=a;
        }
        if(n==0) m=1;
        else
        {
            while(n)
            {
                j=m%n;
                m=n;
                n=j;
            }
        }
        if(j!=1)
        {
            a=a/m;
            b=b/m;
        }
        cout<<a<<"/"<<b<<endl;
    }
    return 0;
}

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#define uid uniform_int_distribution
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
#define bpop(x) __builtin_popcountll((ulli)x)
#define blead(x) __builtin_clzll((ulli)x)
#define btrail(x) __builtin_ctzll((ulli)x)
const double PI = acos(-1);
template<class my>
using ind_set = tree<my,null_type,less<my>,rb_tree_tag,tree_order_statistics_node_update>;

#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define ppb pop_back()
#define ppf pop_front()
#define all(vec) vec.begin(), vec.end()
#define fol(i,a,b) for(int i=a;i<b;i++)
#define loop(i,a,b) for(int i=a;i>=b;i--)
#define forr(x,arr) for(auto& x:arr)
#define mod 1000000007
#define INF 0x3f3f3f3f3f3f3f3f
#define EPS 1e-10
#define sz(x) (int)(x).size()

using lli   = long long;
using ulli  = unsigned long long int;
using pll   = pair<lli, lli>;
using ttt   = pair<lli, pll>;
using vttt  = vector<ttt>;
using vll   = vector<pll>;
using vl    = vector<lli>;
using vi    = vector<int>;
using vvi   = vector<vector<int>>;
using cd    = complex<long double>;

#ifdef tejasp
template<typename T>
void __p(T a) { cout << a << " "; }
template<typename T, typename F>
void __p(pair<T, F> a) { cout << "{ "; __p(a.ff); __p(a.ss); cout << "} "; }
template<typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
	cout<<name<<" : ";__p(arg1); cout<<endl;
}
template<typename Arg1>
void __t(const char *name, Arg1 &&arg1)
{ cout<<name<<" : { "; for (auto p : arg1) __p(p); cout<<"}"<<endl; }
template<typename Arg1, typename ... Args>
void __f(const char *names, Arg1 &&arg1, Args &&... args) {
	int bracket=0,i=0;
	for(; ;i++)
		if(names[i]==','&&bracket==0)
			break;
		else if(names[i]=='(')
			bracket++;
		else if(names[i]==')')
			bracket--;
	cout.write(names,i)<<" : ";
	__p(arg1);  cout<<"| ";
	__f(names+i+1,args...);
}
template<typename Arg1, typename Arg2>
void __f(const char *names, Arg1 arg1[], Arg2 &&arg2){
    int i=0;
	for(; ;i++) if(names[i]==',') break;
	cout.write(names,i)<<" : { ";
	fol(i,0,arg2) __p(arg1[i]);
	cout << "} "<<endl;
}
#define trace(...) { cout<<"Line:"<<__LINE__<<" | "; __f(#__VA_ARGS__, __VA_ARGS__); }
#define cotra(...) { cout<<"Line:"<<__LINE__<<" | "; __t(#__VA_ARGS__, __VA_ARGS__); }
#else
#define endl '\n'
#define trace(...)
#define cotra(...)
#endif

lli get(lli n, lli m, lli val)
{
    long double temp=(long double)n/m;
    return round(temp*val-EPS);
}

void tejas_919(int kkkk)
{
    lli n, m, k, q, u, v=0, temp=0;
    long double store, val=mod;
    cin>>n>>m>>k;
    fol(i,1,k+1)
    {
        temp=get(n,m,i);
        store=fabs(((long double)n/m)-((long double)temp/i));
        if(store<val) {u=temp; v=i; val=store; }
    }
    cout<<u<<"/"<<v<<endl;
}

int main()
{
    #ifndef tejasp
        ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    #endif
    cout << fixed << setprecision(10);
    int t=1;
    //cin>>t;
    fol(i,0,t) { tejas_919(i+1); }
}

#include <bits/stdc++.h>
using namespace std;
int main() {
	long long x, y, n, j, i, A, B, k, mn1, mn2;
	scanf("%lld%lld%lld", &x, &y, &n);
	for(i = 1; i <= n; i++) {
		if(i == 1) {
			A = k; B = i;
		}
		k = x * i / y;
		for(j = 0; j <= 10; j++) {
			k += j;
			mn1 = 1ll * abs(x * i - y * k) * y * B;
			mn2 = 1ll * abs(x * B - y * A) * y * i;
			if(mn1 < mn2) {
				A = k; B = i;
			}
		}
	}
	printf("%lld/%lld\n", A / __gcd(A, B), B / __gcd(A, B));
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define read() freopen("input.txt", "r", stdin)
#define write() freopen("output.txt", "w", stdout)
#define ff(i,a,b) for(int i = (a); i <= (b); i++)
#define fr(i,a,b) for(int i = (a); i >= (b); i--)
#define REP( i , n ) for( int i = 0 ; i < n ; i++ )
#define REPI( n , i ) for( int i = n ; i >= 0 ; i-- )
#define sc( x ) scanf( "%d" , &x )
#define sc2( x , y ) scanf( "%d%d" , &x , &y )
#define scd( x ) scanf( "%.9f" , &x )
#define scl( x ) scanf( "%I64d" , &x )
#define pf( x ) printf( "%d\n" , x )
#define pfd( x ) printf( "%.9f\n" , x )
#define pfl( x ) printf( "%I64d\n" , x )
#define rrc( x ) return cout << x , 0 ;
#define all( v ) v.begin(),v.end()
#define all_r( v ) v.rbegin() , v.rend()
#define fi first
#define se second
#define SZ(a) int(a.size())
#define pb push_back
#define pi acos(-1.0)
#define e2( x ) ( x )*( x )
#define r2( x ) sqrt( 1.0*( x ) )
#define ones(x) __builtin_popcount(x)
#define MCM( a , b ) ( ( a*b )/( __gcd( a , b ) ) )
#define ddd cout << "despues" << endl ;
#define sss cout << "------------------" << endl ;
#define aaa cout << "antes" << endl ;
#define da( a , b ) ( (a)/(b) - ( (a) < 0 && (a)%(b) != 0 ) )
#define ceil_( a , b ) ( da( (a) , (b) ) + ((a)%(b) > 0) )
#define Mm greater<int>
#define DEBUG( x ) cerr <<  #x << "=" << x << endl;
#define DEBUG2( x , y ) cerr << #x << "=" << x << " " << #y << "=" << y << endl;
#define DEBUGL(x,n) cout << #x << " :" <<endl; REP(i,n)cout<<x[i]<<char(i+1==n?10:32);
#define DEBUGC(x,n,m) cout << #x << " :" <<endl; REP(i,n)REP(j,m)cout<<x[i][j]<<char(j+1==m?10:32);

typedef double db ;
typedef long double ld ;
typedef long long ll ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<ll> vl ;
typedef vector<bool> vb ;
typedef pair<int,int> pii ;
typedef vector<pii> vpii ;
const int EPS = 1e-6 ;
const int INF = (int)( INT_MAX - 100 ) ;
const ll mod = (int)( 1e+9 + 7 ) ;
const int N = (int)( 0 ) ;
//inline ll modulo( ll num ){ ( ( num %= mod ) += mod ) %= mod ; return num ; }
//inline ll pot( int b , int e ){ ll p = 1 ; REP( i , e ) p = (p*b)%mod ; return p ; }

int main()
{
//	ios_base::sync_with_stdio(0);
	int x , y , n ;
	cin >> x >> y >> n ;
	ff( d , 2 , y ){
		while( x%d == 0 && y%d == 0 )
			x /= d , y /= d ;
	}
	db md = INF ;
	pii div ;
	fr( b , y , 1 ){
		if( b > n ) continue ;
		REPI( 1 , z ){
			ll a = 1LL*b*x / y + z ;
			db dif = abs( 1.0*a / b - 1.0*x / y ) ;
			if( dif <= md ){
				md = dif ;
				div = { a , b } ;
			}
		}
	}
	ff( d , 2 , div.se )
		while( div.fi%d == 0 && div.se%d == 0 )
			div.fi /= d , div.se /= d ;
	cout << div.fi << "/" << div.se ;

	return 0 ;
}

using namespace std;
#include<string.h>
#include <sstream>
typedef long long int ll;
typedef long double ld;
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <iterator>
#include <unordered_map>
#include <map>
//#define N 4
#include <stack>
#include <unordered_set>
#include <math.h>
#include <cstring>
#include <bitset>
#include <numeric>
#include <set>
#include <sstream>
#include <list>
#include <queue>
#define PI 3.14159265358979323846264338327950
#define mp make_pair
#define inf 1e9
//#define M 1000000007
#define M 10000000
//#define N 1000000000
#define N 200000

double x, y, n;
ll ansa = 0, ansb = 1;
double ans = 100000000;

void solve(double b) {

	ll A = b * x / y;
	ll AA = A + 1;

	double aa = abs((x / y) - (A / b));
	double bb = abs((x / y) - (AA / b));

	if (aa < ans) {
		ans = aa;
		ansa = A;
		ansb = b;
	}
	if (bb < ans) {
		ans = bb;
		ansa = AA;
		ansb = b;
	}
}

int main() {

	ios::sync_with_stdio(0);
	cin.tie(0);

	cin >> x >> y >> n;

	for (double b = 1; b <= n; b++) {
		solve(b);
	}

	cout << ansa << "/" << ansb << endl;

}

#include<bits/stdc++.h>
using namespace std;
#define int int64_t
int32_t main()
{
    int x,y,n;
    cin>>x>>y>>n;
    double dis=1e10;
    int a=0,b=0;
    for(int i=1;i<=n;i++)
    {
        int num=(double)i*x/y;
        double tmp;
        tmp=abs(x*1.0/y*1.0-num*1.0/i*1.0);
        if(tmp<dis)
        {
            dis=tmp;
            a=num,b=i;
        }
        tmp=abs(x*1.0/y*1.0-(num-1)*1.0/i*1.0);
        if(tmp<dis)
        {
            dis=tmp;
            a=num-1;
            b=i;
        }
        tmp=abs(x*1.0/y*1.0-(num+1)*1.0/i*1.0);
        if(tmp<dis)
        {
            dis=tmp;
            a=num+1;
            b=i;
        }
    }
    cout<<a<<"/"<<b<<endl;
    return 0;
}

#include <cstdio> //PROG: CF281B
#include <cstring>
#include <algorithm>
double abs(double x){return (x<0)?(-x):(x);}
double EPS=1e-15;
//bool eq(double a,double b){return (a+EPS>=b)&&(a-EPS<=b);}
int main(){
	#ifdef JACK1_NOTEBOOK
	freopen("CF281B_in.txt","r",stdin);
	freopen("CF281B_out.h","w",stdout);
	#endif
	int x,y,n,a,b,p,q,i;
	double cost=1e10,t;
	scanf("%d%d%d",&x,&y,&n);
	if (y<=100)EPS=1e-9;
	for (b=1;b<=n;b++){
		a=1LL*x*b/y;
		for (i=-1;i<=1;i++){
			//if (b==49351 || b==24731)
				//printf("trying [%10d,%10d] %.20lf\n",a+i,b,abs(1.0*x/y-(1.0*a+i)/b));
			t=abs(1.0*x/y-(1.0*a+i)/b);
			if (cost-t > EPS){
				cost = t;
				p=a+i,q=b;
			}
		}
	}
	printf("%d/%d\n",p,q);
}

// بِسمِ اللہِ  الرَّحم?نِ  الرَّ حِیم
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define MOD 1000000007
#define ll long long
#define pb push_back
#define INF 1e18
#define N 10001000
typedef pair<ll,ll> pll;
ll power(ll a,ll b)
{
    if(b==1)return a;
    if(b==0)return 1;
    ll temp=power(a,b/2);
    ll ans=temp*temp;
    if(b&1)
        ans*=a;
    return ans;
}
ll power(ll a,ll b,ll p)
{
    a=a%p;
    if(b==1)return a;
    if(b==0)return 1;

    ll temp=power(a,b/2,p);
    ll ans=(temp*temp)%p;
    if(b&1)
        ans=(a*ans)%p;
    return ans;
}
ll inv(ll a)
{
    return power(a,MOD-2,MOD);
}
//code begins
ll x,y,n;
bool comp(pll f1,pll f2)
{
    ll a1=f1.first,b1=f1.second,a2=f2.first,b2=f2.second;
    return (x*b1-y*a1)*(y*b2)<(x*b2-y*a2)*(y*b1);
}
signed main()
{
//    freopen("input.txt","r",stdin);
//    freopen("output.txt","w",stdout);

    cin.sync_with_stdio(false);
    ll t;
    t=1;
//    cin>>t;
    while(t--)
    {
        cin>>x>>y>>n;
            double dis=INF;
            ll a=0,b=0;
            for(ll i=1;i<=n;i++)
            {
                ll num=(double)i*x/y;
                double tmp;
                tmp=abs(x*1.0/y*1.0-num*1.0/i*1.0);
                if(tmp<dis)
                {
                    dis=tmp;
                    a=num,b=i;
                }
                tmp=abs(x*1.0/y*1.0-(num-1)*1.0/i*1.0);
                if(tmp<dis)
                {
                    dis=tmp;
                    a=num-1;
                    b=i;
                }
                tmp=abs(x*1.0/y*1.0-(num+1)*1.0/i*1.0);
                if(tmp<dis)
                {
                    dis=tmp;
                    a=num+1;
                    b=i;
                }
            }
            cout<<a<<"/"<<b<<endl;
    }
}

#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <deque>

using namespace std;

long long x, y, a = 0, b = 0, n, a1, a2, ma, mb, ca, cb;

int main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    cin >> x >> y >> n;
    for (int i = 1; i <= n; i++) {
        while (ma % 2 == 0 && mb % 2 == 0) {
            if (ma / 2 > 0 && mb / 2 > 0) {
                ma /= 2;
                mb /= 2;
            }
            else
                break;
        }
        if (i == 655)
            a1 = 1;
        a1 = int(ceil((double(i * x) / (double)y)));
        a2 = int(floor((double(i * x) / (double)y)));
        if (abs(i * x - a1 * y) < abs (i * x - a2 * y)) {
            a1 = a1;
        }
        else
            a1 = a2;
        ca = abs(x * i - y * a1);
        cb = i * y;
        if (b == 0) {
            a = a1;
            b = i;
            ma = abs(x * b - y * a);
            mb = b * y;
        }
        else {
            if (ca * mb < ma * cb) {
                ma = ca;
                mb = cb;
                a = a1;
                b = i;
            }
        }
    }
    cout << a << '/' << b;
    return 0;
}

#pragma comment(linker, "/STACK:256000000")

using namespace std;
#include <vector>
#include <iostream>
#include <time.h>
#include <string>
#include <algorithm>
#include <queue>

#define pb push_back
#define mp make_pair
#define X first
#define Y second
const double EPS = 1E-16;

double mabs(double a)
{
	if (a  < 0)
	return -a;
	else return a;
}

int main()
{
	#ifdef TVISKARON
	freopen("in.txt", "rt", stdin);
	freopen("out.txt", "wt", stdout);
	#else
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	#endif
	int x, y, n;
	cin >>  x >> y >> n;

	int a = 0, b = 0;
	double d = ((x + .0)) / y;
	double ans = 100000000;

	for(int j = 1; j <= n; j++)
	{
		int l = 0, r = 1000*1000*1000;
		while(r - l > 3)
		{
		int m1 = l + (r - l) / 3;
		int m2 = r - (r - l) / 3;
		double t1 = mabs(d - (m1 + .0) / j);
		double t2 = mabs(d - (m2 + .0) / j);
		//cout << t1 <<  ' ' << t2 << endl;
		if (t1 > t2)
			l = m1;
		else r = m2;
		}
		for(int i = l; i <= r; i++)
		{
			double v = mabs(d - (i + .0) / j);
			if (ans > v)
			{
				ans = v;
				a = i;
				b = j;
			}
		}
	}
	std::cout  << a << '/' << b;
}

#include <bits/stdc++.h>
using namespace std;

#define mp make_pair
#define pb push_back
#define rep(i,x,n) for(int i=x;i<n;i++)
#define repn(i,n,x) for(int i=n;i>=x;i--)
#define repe(i,x,n) for(int i=x;i<=n;i++)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define PI 3.1415926536
#define mod 1000003
#define F first
#define S second
#define INF 1e11+20

typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a,ll b)
{
    if(!b)return a;
    return gcd(b,a-a/b*b);
}

ll lcm(ll a,ll b)
{
    return a*b/gcd(a,b);
}

int main()
{
    ll x,y,n;
    while(cin>>x>>y>>n)
    {
        ll a,b;

        if(y<=n){a=x; b=y;}
        else{
        double mi=INF;
        double c=(double)x/(double)y+1e-9;

        for(ll i=1;i<=n;i++)
        {
            ll tmp=i*y;
            ll nu1=(x*i)/y*y;
            ll nu2=(x*i)/y*y+y;

            double d=(double)nu1/(double)tmp+1e-9;
            double d2=(double)nu2/(double)tmp+1e-9;
            double dif=abs(d-c)+1e-9;
            double dif2=abs(d2-c)+1e-9;
            if(dif<mi)
            {
                mi=dif;
                a=nu1;
                b=tmp;
            }
            if(dif2<mi)
            {
                mi=dif2;
                a=nu2;
                b=tmp;
            }
        }
        }
        ll g=gcd(a,b);
        cout<<a/g<<"/"<<b/g<<endl;
    }
    return 0;
}

#pragma comment(linker, "/STACK:256000000")

#include <vector>
#include <iostream>
#include <time.h>
#include <string>
#include <algorithm>
#include <queue>
using namespace std;

#define pb push_back
#define mp make_pair
#define X first
#define Y second

//

double mabs(double a)
{
	if (a  < 0)
	return -a;
	else return a;
}

int main()
{
	#ifdef TVISKARON
	freopen("in.txt", "rt", stdin);
	freopen("out.txt", "wt", stdout);
	#else
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	#endif
	int x, y, n;
	cin >>  x >> y >> n;

	int a, b;
	double ans = 100000000;
	double d = double(x + .0) / y;

	int j = 0;
	while(++j <= n)
	{
		int l = 0, r = 1000 * 1000 * 100;
		while(r - l > 3)
		{
		int m1 = l + (r - l) / 3;
		int m2 = r - (r - l) / 3;
		double t1 = mabs(d - (m1 + .0) / j);
		double t2 = mabs(d - (m2 + .0) / j);
		if (t1 >= t2)
			l = m1;
		else r = m2;
		}
		int i = l - 1;

		while(i++ <= r)
		{
			double v = mabs(d - (i + .0) / j);
			if (v < ans)
			{
				ans = v;
				a = i;
				b = j;
			}
		}
	}
	//if (x == 0)
//	{
//		cout << 0 << '/' << 1;
//	}
	cout << a << '/' << b;
}

#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
#define pf(i,s,t) for (int (i)=s;(i)<(t);(i)++)
#define mf(i,s,t) for (int (i)=s;(i)<(t);(i)--)
#define mt(a,d) memset((a),(d),sizeof(a))
using namespace std;
main()
{
	int x,y,n;
	scanf("%d%d%d",&x,&y,&n);
	double k=x/(y*1.0);
	double min=100;
	int a,b;
	int minb=1000000;
	for (int i=1;i<=n;i++)
	{
		int z=(int)floor(i*k);
		if (min-fabs(k-1.0*z/i)>1e-15)
		{
			min=fabs(k-1.0*z/i);
			a=z;
			b=i;
		}
		z++;
		if (min-fabs(k-1.0*z/i)>1e-15)
		{
			min=fabs(k-1.0*z/i);
			a=z;
			b=i;
		}
	}
	printf("%d/%d\n",a,b);
	return 0;
}

#include <iostream>
 #include <cmath>
 #include <iostream>
using namespace std;

int main()
{ long double x,y;
 int n ;
 cin>>x>>y>>n ;

 long double p=0;
 long double s=1 ;
 for( long double  i=1;i<=n;i++)
{   long double a=floor((x/y)*i) ;
     long long t=ceil((x/y)*i) ;
   if(abs(x/y-a/i)<abs(x/y-p/s))
  { p=a ;
      s=i ;
  }
  if(abs(x/y-t/i)<abs(x/y-p/s))
  {
      p=t ; s=i ;
  }
}cout<<p<<'/'<<s ;}

#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair
#define A first
#define B second
#define lb long double
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define fo(i,n) for(i=0;i<n;i++)
#define mpp map<ll,ll>m;
#define vec vector<ll>v;
#define mod (ll)(1e9+7)
int t=1;

void solve()
{
   ll x,y,a,b,n,i,a1,a2;
   double c,d,p,q,r,s;
   cin>>x>>y>>n;
   c=(double)x/y;
   //cout<<c<<"\n";
   double mi=c+1;
   for(i=n;i>=1;i--)
   {
      a=c*i;
      p=(double)a/i;
      q=(double)(a+1)/i;
      //cout<<a<<" "<<p<<" "<<q<<" "<<abs(c-p)<<" "<<abs(c-q)<<"\n";
      if(abs(c-p)>abs(c-q))
      a++;
      p=(double)a/i;
      if(abs(c-p)<=mi)
      {
         mi=abs(c-p);
         a1=a;
         a2=i;
      }
   }
   cout<<a1<<"/"<<a2<<"\n";

}
int main()
{
   fast
   //cin>>t;
   while(t--)
   {
      solve();
   }
}

// File Name: b.cpp
// Author: Missa
// Created Time: 2013/3/10 星期日 23:46:24

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<string>
#include<vector>
#include<cstdlib>
#include<map>
#include<set>
using namespace std;
#define CL(x,v) memset(x,v,sizeof(x));
#define R(i,st,en) for(int i=st;i<en;i++)
#define ll long long
int x,y,n,a,b;
int main()
{
    while(~scanf("%d%d%d",&x,&y,&n))
    {
        double tmp=1e18;
        for(int i=1;i<=n;i++)
        {
            int ta=(double)x * i / y;
            double fu=fabs(x * 1.0 / y - ta * 1.0 /i);
            if(fu < tmp)
            {
                a=ta;b=i;
                tmp=fu;
            }
            ta++;
            fu=fabs(x * 1.0 / y - ta * 1.0 /i);
            if(fu<tmp)
            {
                a=ta;b=i;
                tmp=fu;
            }
        }
        printf("%d/%d\n",a,b);
    }
    return 0;
}

#include <stdio.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <cstring>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <algorithm>
#define N 1002
#define INF 1000000005

#define C(x) memset(x, -1, sizeof(x))
#define go(i,n,m) for(int i=n; i<=m; i++)
#define down(i,n,m) for(int i=n; i>=m; i--)

using namespace std;

typedef long long ll;
void gt(int &a, int b){ if (a < b) a = b; }
string n2s(int a){ stringstream ss; ss << a; return ss.str(); }

ll x, y, n, aa, bb;
double Min = INF;

void check (ll a, ll b){
    double smaller = (double)x/y - (double)a/b;
    if(smaller <=0) smaller = -smaller;

    if(smaller < Min || (smaller == Min && a < aa)){
        Min = smaller;
        aa = a;
        bb = b;
    }
}

int main() {
//    ifstream in;
//    in.open("/Users/Tom/Program/algo/programming_challenge/data/input.txt");
//    std::cin.rdbuf(in.rdbuf()); //redirect std::cin to in.txt!

    cin >> x >> y >> n;
    go(b,1,n){
        ll a = (b*x)/y;
        check(a,b);
        check(a+1,b);
    }
    cout << aa << "/" << bb << endl;
    return 0;
}

#include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
typedef long long int lli;

int main(){
	_
	lli x,y,n;
	cin >> x >> y >> n;
	if(y<=n){
		int q = __gcd(x,y);
		cout << x/q << "/" << y/q;
		return 0;
	}
	double tmp = (x*1.0)/(y*1.0);
	lli a,b;
	int l = ((x*1.0)/(y*1.0));
	double z = abs(tmp-(l*1.0));
	double res = z;
	a = l;
	b = 1;
	for(lli i=1; i<=n; i++){
		l = ((x*i*1.0)/(y*1.0));
		z = abs(tmp-((l*1.0)/(i*1.0)));
		// cout << z << " " << l << "\n";
		if(z < res){
			res = z;
			a = l;
			b = i;
		}
		l++;
		z = abs(tmp-((l*1.0)/(i*1.0)));
		// cout << z << " " << l << "\n";
		if(z < res){
			res = z;
			a = l;
			b = i;
		}
	}

	cout << a << "/" << b;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
// debug & operator << (debug & dd, P p) { dd << "(" << p.x << ", " << p.y << ")"; return dd; }

using ll = long long;

const ll B = 1e5;
pair<ll, ll> get_p(ll a) {
	return {a / B, a % B};
}
pair<ll, ll> mul(pair<ll,ll> a, pair<ll,ll> b) {
	ll one = a.first * b.first * B + a.first * b.second + a.second * b.first;
	ll two = a.second * b.second;
	one += two / B;
	two %= B;
	return {one, two};
}

bool is_smaller(ll a, ll b, ll c, ll d) {
	return mul(get_p(a), get_p(d)) < mul(get_p(b), get_p(c));
	// return a * d < b * c;
	// a/b < c/d
	assert(b);
	assert(d);
	ll one = a / b, two = c / d;
	if(one != two) {
		return one < two;
	}
	if(a % b != c % d) {
		return a % b < c % d;
	}
	return false;
}

bool is_eq(ll a, ll b, ll c, ll d) {
	return mul(get_p(a), get_p(d)) == mul(get_p(b), get_p(c));
	// return a * d == b * c;
	// a/b < c/d
	assert(b);
	assert(d);
	ll one = a / b, two = c / d;
	if(one != two) {
		return false;
	}
	if(a % b != c % d) {
		return false;
	}
	return false;
}

int main() {
	ll x, y, n;
	cin >> x >> y >> n;
	ll a = 1, b = 1;
	for(ll down = 1; down <= n; ++down) {
		// up/down=x/y
		for(ll up : {x*down/y, x*down/y+1}) {
			ll one = abs(up * y - x * down);
			ll two = y * down;

			ll three = abs(a * y - x * b);
			ll four = y * b;

			// one/two vs. three/four
			if(is_smaller(one, two, three, four) || (is_eq(one, two, three, four) && up < a)) {
				a = up;
				b = down;
			}
		}
	}
	printf("%lld/%lld\n", a, b);
}

#include <bits/stdc++.h>
using namespace std;

long double eps=0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001;
long double diff=LONG_MAX;

int main()
{
    // cout << "Hello World!" << endl;
    ios::sync_with_stdio(false);
    pair <long long,long long> ans;
   long long x,y,n,a,b;
   cin>>x>>y>>n;
   long double xbyy=(long double)x/(long double)y;
//   cout<<xbyy<<"@@@@\n";

   for(long long b=1;b<=n;b++){
       long double ald=xbyy*((long double)b),diff1,diff2;
       long long a1,a2;
       a1=(long long)ald;
       a2=a1+1;
       //a1= xbyy - a1/b
       diff1=xbyy - ((long double)a1/(long double)b);
       diff2=((long double)a2/(long double)b)-xbyy;
       if(diff-diff1>eps){
           ans.first=a1;
           ans.second=b;
           diff=diff1;
       }

       if(diff-diff2>eps){
           ans.first=a2;
           ans.second=b;
           diff=diff2;
       }
    //   cout<<setprecision(10)<<b<<" , "<<diff1<<" ,, "<<diff2<<":::\n";
   }
//   cout<<diff<<":::\n";
   cout<<ans.first<<"/"<<ans.second;
    return 0;
}

#include<iostream>
using namespace std;
typedef _Longlong ll;
int main()
{
    ll x, y, n;
    cin >> x >> y >> n;
    ll a = 0, b = 1;
    /*double min = (1 << 31)-1;*/
    for (int i = 1; i <= n; i++)
    {
        ll j = floor(1.0*i*x / y);
        //int j2 = ceil(i*x / y);
        //cout << abs(a*y - x*b)*i << " " << abs(j*y - x*i)*b << endl;
        if (abs(x*i - y*j) > abs(i*x - y*(j + 1))) ++j;
        if (abs(a*y - x*b)*i > abs(j*y - x*i)*b)
        {
            a = j;
            b = i;
        }
    }
    cout << a<< "/" << b;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long n,x,y,a=-1,b=0,i,j;
main()
{
    cin>>x>>y>>n;
    for (i=1;i<=n;i++)
    {
        j=i*x/y;
        if (x*i-j*y>(j+1)*y-x*i) j++;
        if (a==-1||abs(a*y-x*b)*i>abs(j*y-x*i)*b) a=j,b=i;
    }
    cout<<a<<'/'<<b<<'\n';
}

#include <math.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>

using namespace std;

const double eps = 1e-10;

int main()
{
    int x,y,n,ansx,ansy;
    scanf("%d%d%d",&x,&y,&n);
    double __std = x*1.0/y , ans = 1e9;
    for(int i=1;i<=n;i++)
    {
        int xx = __std * i;
        xx--;
        if(ans > fabs(xx*1.0/i - __std))
            ans = fabs(xx*1.0/i - __std) , ansx = xx , ansy = i;
        xx++;
        if(ans > fabs(xx*1.0/i - __std))
            ans = fabs(xx*1.0/i - __std) , ansx = xx , ansy = i;
        xx++;
        if(ans > fabs(xx*1.0/i - __std))
            ans = fabs(xx*1.0/i - __std) , ansx = xx , ansy = i;
    }
    printf("%d/%d\n",ansx,ansy);
    return 0;
}

#pragma comment(linker, "/STACK:128777216")
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cstdio>
#include <vector>
#include <memory.h>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <string.h>
#include <cmath>
#include <math.h>
#include <queue>
#include <stack>
#include <cassert>

#define forn(i,n) for (int i = 0; i < (int)n; i++)
#define fornd(i, n) for (int i = (int)n - 1; i >= 0; i--)
#define forab(i,a,b) for (int i = (int)a; i <= (int)b; i++)
#define forba(i,b,a) for (int i = (int)b; i >= (int)a; i--)
#define zero(a) memset (a, 0, sizeof (a))
#define _(a, val) memset (a, val, sizeof (a))
#define pb push_back
#define mp make_pair
#define all(v) (v).begin(), (v).end()
typedef long long ll;
typedef unsigned long long ull;

const ll LINF= 1000000000000000000LL;
const int INF = 1000000000;
const long double eps = 1e-9;
const long double PI = 3.1415926535897932384626433832795l;

using namespace std;

void prepare (string s)
{
#ifdef _DEBUG
    freopen ("input.txt", "r", stdin);
    //freopen ("output.txt", "w", stdout);
#else
    if (s.length() != 0)
    {
        freopen ((s + ".in").c_str(), "r", stdin);
        freopen ((s + ".out").c_str(), "w", stdout);
    }
#endif
}

const int NMAX = 100100;

int main ()
{
    prepare ("");

    int x = 0, y = 0, n = 0;
    cin >> x >> y >> n;
    double a = 0, b = 0, ax = 0, ay = 0, r = (double)x / (double)y, d = INF;

    forab(i, 1, n)
    {
        a = (int)(r * i);
        forab(j, 0, 2)
        {
            if (d > abs(r - (a + j) / (double)i))
            {
                d = abs(r - (a + j) / (double)i);
                ax = a + j;
                ay = i;
            }
        }
    }

    cout << ax << '/' << ay;

    return 0;
}

#include <stdio.h>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
    long long x,y,n;
    long long a=-1,b,i,j;
    while(scanf("%lld%lld%lld",&x,&y,&n)!=EOF){
        for(i=1;i<=n;i++){
            j=i*x/y;
            if(i*x-j*y>(j+1)*y-i*x) j++;
            if(a==-1||abs(a*y-x*b)*i>abs(j*y-x*i)*b) a=j,b=i;
        }
        printf("%lld/%lld\n",a,b);
    }
}

#include <bits/stdc++.h>
#define LL long long
#define PII pair<int,int>
#define PIII pair<int,pii>
#define PLL pair<ll,ll>
#define PLII pair<ll,pii>
#define VI vector<int>
#define FF first
#define SS second
#define MP make_pair
#define PB push_back
#define MX 10000100
#define EPS 0.0000001
#define MOD 1000000007
#define PI acos(-1)
#define INF 100000000
#define loop(i,b,n) for(int i=b;i<n;++i)
#define rev_loop(i,b,n) for(int i=b;i>=n;--i)
using namespace std;

int gcd(int a, int b)
{
    if(b==0) return a;
    else return gcd(b,a%b);
}

int main()
{
    LL x,y,n;
    cin>>x>>y>>n;

    if(y <= n)
    {
        int g = gcd(x,y);
        x = x/g;
        y = y/g;
        cout<<x<<'/'<<y<<'\n';
    }
    else
    {
        LL a=-1,b=-1,a1,b1;
        loop(i,1,n+1)
        {
            a1 = (i*x)/y;
            b1 = i;
            if(a==-1 || (abs(b1*x - a1*y)*b*y) < (abs(b*x - a*y)*b1*y)) {a = a1;b = b1;}
            ++a1;
            if(a==-1 || (abs(b1*x - a1*y)*b*y) < (abs(b*x - a*y)*b1*y)) {a = a1;b = b1;}
        }

        cout<<a<<'/'<<b<<'\n';
    }

    return 0;
}

#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>

using namespace std;

const int N = 1e5+5;

double eps = 1e-15;

double standard,ans;

int ansx,ansy;

inline int sgn(double x){
    return x<-eps ? -1 : x>eps;
}

void erfen(int y)
{
    long long l = 0 , r = y*standard+1;
    while(l < r)
    {
        long long m = l+r >> 1;
        if(m*1.0/y < standard-eps)
            l = m+1;
        else
            r = m;
    }
    if(sgn(ans - (standard-(r-1)*1.0/y)) > 0)
    {
        ansx = r-1;
        ansy = y;
        ans = standard-(r-1)*1.0/y;
    }
    if(sgn(ans - (r*1.0/y-standard)) > 0)
    {
        ansx = r;
        ansy = y;
        ans = r*1.0/y-standard;
    }
}

int main()
{
    int x,y,n;
    scanf("%d%d%d",&x,&y,&n);
    standard = x*1.0 / y;
    ans = 1e9;
    for(int i=1;i<=n;i++)
        erfen(i);
    printf("%d/%d\n",ansx,ansy);
    return 0;
}

#include <bits/stdc++.h>
#define ull unsigned long long
#define ll long long
#define ld long double
#define pi 3.1415926536
#define re return
using namespace std;
double x,y,z=1e9,a,n,out1,out2;
int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    cin >> x >> y >>n;
    for(double b;b<=n;b++){
        while(abs(a/b-x/y)>abs((a+1)/b - x/y))a++;
        if(abs(a/b-x/y)<z)
            z=abs(a/b-x/y),out1=a,out2=b;
        if(!z){
            cout<<out1<<"/"<<out2<<endl;
            re 0;
        }
    }
    cout<<out1<<"/"<<out2<<endl;
   	re 0;
}

#include <iostream>
#include <cmath>
#define ll long long
#define pii pair<ll, ll>
#define fst first
#define snd second
const double EPS = 1e-15;
using namespace std;
pii best = {0, 1}; ll x, y, n;
int main()
{
	cin >> x >> y >> n;
	for (int i = 1; i <= n; i++)
	{
		ll k1 = x * i / y, k2 = k1 + 1;
		if (abs((double)k1 / i - (double)x / y) - abs((double)best.fst / best.snd - (double)x / y) < -EPS) {best = {k1, i};}
		if (abs((double)k2 / i - (double)x / y) - abs((double)best.fst / best.snd - (double)x / y) < -EPS) {best = {k2, i};}
	}
	cout << best.fst << "/" << best.snd << "\n";
	return 0;
}

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
typedef long long LL;

int main()
{
	int x, y, n;
	scanf("%d%d%d", &x, &y, &n);
	int a = 0, b = 1;
	for(int i = 1; i <= n; ++i) {
		LL delta = abs((LL)x * i * b - (LL)a * i * y);

		int t1 = (double)x * i / y;
		int t2 = t1 + 1;

		LL td1 = abs((LL)t1 * b * y - (LL)x * i * b);
		LL td2 = abs((LL)t2 * b * y - (LL)x * i * b);

		if(td1 < delta)
			delta = td1, a = t1, b = i;
		if(td2 < delta)
			delta = td2, a = t2, b = i;
	}
	printf("%d/%d\n", a, b);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
	long double x,y,a,b;
	int n;
	cin>>x>>y>>n;
	long double Min=INT_MAX;
	long double p;
	int i;
	for(i=1;i<=n;i++)
	{
		p=(long long int)((x*i)/y);
		if(abs(x/y-p/i)<Min)
		{
			Min=abs(x/y-p/i);
			a=p;
			b=i;
		}
		p=ceil((x*i)/y);
		if(abs(x/y-p/i)<Min)
		{
			Min=abs(x/y-p/i);
			a=p;
			b=i;
		}

	}
	cout<<a<<"/"<<b<<endl;
	return 0;
}

#include<iostream>

using namespace std;

int main(){
   long long int x, y,  n ,ans1 , ans2 ;
   long double a , b , c  , d , f , res=1000000000000ll   ;
   cin>>x>>y>>n;
   c=x,d=y;
   for(int i=1;i<=n;i++){
      a=(i*x)/y,b=(i*x)/y,f=i;
      if(i*x%y) b++;
      if(i*x-a*y<res*f*y) ans1=a,ans2=i,res=(f*c-a*d)/(f*d);
      if(b*y-i*x<res*f*y) ans1=b,ans2=i,res=(b*d-f*c)/(f*d);
   }
   cout<<ans1<<"/"<<ans2<<endl;
   return 0;
}

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;

typedef long long ll;
const int INF = 100001;

//check whether |a1/b1 - x/y| > |a2/b2 - x/y|
bool isBig(ll a1, ll b1, ll a2, ll b2, ll x, ll y) {
  ll part1 = abs(a1*y-b1*x);
  ll part2 = abs(a2*y-b2*x);
  return (part1*b2*y) > (part2*b1*y) ;
}

int main() {
  //freopen("test.txt", "r", stdin);

  ll x, y, n;
  while (cin >> x >> y >> n) {
    int a=INF, b=1;
    for (int i = 1; i <= n; ++i) {
        ll low_bound = (x*i)/y;
        ll up_bound = low_bound+1;
        ll choose = low_bound;
        if (isBig(low_bound, i, up_bound, i, x, y))
          choose = up_bound;

        if (isBig(a, b, choose, i, x, y)) {
          a = choose;
          b = i;
        }
    }
    cout << a << "/" << b << endl;
  }
  return 0;
}

//Codeforces - Nearest Fraction - 281B Div2
#include <bits/stdc++.h>
using namespace std;

int gcd(int x, int y) {
    return __gcd(x,y);
}

int main() {
    ios::sync_with_stdio(false);
    const int N = 100000;
    const double EPS = 1e-9;

    int x, y, n;
    cin >> x >> y >> n;

    pair<int, int> ans;
    double nf = N, local_nf;

    if (n >= y) {
        ans = {x / gcd(x,y), y / gcd(x,y)};
    } else {
        for (int b = 1; b <= n; b++) {
            int lo = 0;
            int hi = N;
            int mid;

            while (lo <= hi) {
                mid = (lo + hi) >> 1;
                local_nf = (double) x / y - (double) mid / b;

                // verificando resultado global
                if (abs(local_nf) < nf || (abs(local_nf - nf) < EPS &&
                            (ans.second > b || (ans.second == b && ans.first > mid)))) {
                    nf = abs(local_nf);
                    ans.first = mid;
                    ans.second = b;
                    // cout << mid << "/" << b << endl;
                }

                // tentando aproximar mid/b de x/y
                if (local_nf < 0) {
                    hi = mid-1;
                } else {
                    lo = mid+1;
                }
            }
        }
    }

    cout << ans.first << "/" << ans.second << endl;
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double ld;
ll x, y, n;
ld mn = 1e8;
pair<int, ll> ans;

int main() {
    scanf("%lld%lld%lld", &x, &y, &n);
    for (int i = 1; i <= n; i++) {
        ll nx = x * i;
        ll nden = y * i;
        ll val = nx / y;
        if (ld(abs(nx - (val * y))) / (ld) nden < mn) {
            mn = ld(abs(nx - (val * y))) / (ld) nden;
            ans.first = i;
            ans.second = val;
        }
        val++;
        if (ld(abs(nx - (val * y))) / (ld) nden < mn) {
            mn = ld(abs(nx - (val * y))) / (ld) nden;
            ans.first = i;
            ans.second = val;
        }
    }
    // I need the accepted to look cool.
    cout << ans.second << "/" << ans.first << endl;
    return 0;
}

#include <cstdio>
#include <vector>
#include <utility>
#include <cstring>
#include <cstdlib>
#include <map>
#include <iostream>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <cmath>
#include <set>
#include <assert.h>
#include <bitset>

using namespace std;
#define pb push_back
#define mp make_pair
#define S second
#define F first
#define INF 0x3f3f3f3f
#define ll long long
#define mod 10
#define B 33
#define MAX (int)10e6
#define eps  0.000000000000001

typedef vector<int> vi;
typedef pair<int,int>ii;
typedef vector<ii> vii;
typedef unsigned long long hash;

double x,y,n;

int main (int argc,char *argv[]){
    cin >> x >> y >> n;

    pair<int,int> p;
    double last = INF;
    for(double i=0 ;i<=n; ++i){
        int xx = (double)(x*i/y);
        int xx2 =(double)(x*i/y)+1;

        if(fabs(x/y - xx/i) < last){
            last = fabs(x/y - xx/i);
            p = mp(xx,i);
        }
        if(fabs(x/y - xx2/i) < last){
            last = fabs(x/y - xx2/i);
            p = mp(xx2,i);
        }
    }
    cout << p.F << '/' << p.S << endl;
    return 0;
    // lalla
}

#include <iostream>
#include <cstdlib>
using namespace std;

int round(double num) {
    int r = num;
    return num - r <= 0.5 ? r : r+1;
}

int main() {
    int x, y, n;
    cin >> x >> y >> n;
    double d = x / double(y);
    long double m = d;

    int b = n;
    int a = n * d;
    for (int i = n; i > 0; --i) {
        int k = round(i * d); // a
        long double p = d - (k / double(i));
        if (p < 0) p *= -1;
        if (p <= m) {
           m = p;
           a = k;
           b = i;
        }
    }

    cout << a << "/" << b << endl;
    return 0;
}

//In the name of Allah
//
//
//////////////////////
// Program:
// Written By Mohsen Sajadi Tabar (MST)
//////////////////////

#include<iostream>
#include<string>
#include<cstring> //memset
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<set>
#include<map>
#include<stack>
#include<vector>
#include<queue>
using namespace std;

#define pii pair<int, int>
#define pll pair <ll , ll>
#define ui unsigned int
#define INF 2000000000
#define eps 1e-10
#define ll long long
#define ull unsigned ll
#define ld long double
#define mp make_pair
#define pb push_back
#define bit(a,b) (((a)>>(b))&1)
#define vi vector <int>
#define gcd __gcd // int
#define vll vector <ll>
#define vvi vector <vi>
#define vs vector <string>
#define clr( a , c ) memset( a , c , sizeof a )
#define print(a) for(int vv=0; vv<sz(a); ++vv) {cout << a[vv]; if(vv != sz(a)-1) cout << ' ';} cout << endl;
#define prr(a) {cout << a << endl; return 0;}
#define pr(a) cout <<a<<endl;
#define all(a) a.begin() , a.end()
#define sz(a) (int) a.size()
#define absol(a) a < 0 ? -(a) : a
ll a,b,n,s = -1,m = -1;
double Min = INF ;

ll Gcd (ll e, ll f)
{
	if(e%f == 0)
	return f;
	return Gcd(f,e%f);
}

ll Kmm (ll e, ll f)
{
	return e*f/Gcd(e,f);
}

void T(ll i)
{
	/*
	double x = double(a)/b;
	ll c = (((double)i*a)/b);
	double l = INF;
	for(int j = c; j<=c+1 ;++j)
	{
		double y = double(j)/i;
		double r = absol(y-x);
		if( r <= Min)
		{
			if(r <Min || (i != m || j < s) )
			{
				Min = r;
				s = j;
				m = i;
			}
		}
	}
	*/
	ll d = Kmm(b,i);
	ll c = a*(d/b);
	ll e = d/i;
	ll r = c%e;
	ll k;
	if(r > e - r)
	{
		k = c + e-r;
	}
	else
		k = c - r;
	k = k/e;
	double M = double(k)/i - double(a)/b;
	M = abs(M);
	if(M <= Min)
	{
		Min = M;
		s = k;
		m = i;
	}
}

int main()
{
	cin >> a >> b >> n;
	for(int i = n; i>=1; --i)
	{
		T(i);
	}
	cout << s / Gcd(s,m) <<'/'<<m/Gcd(s,m) <<endl;
}

#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<string>
#include<vector>
#include<set>
#include<cstring>
#include<algorithm>
using namespace std;
const int N = 2e5 + 5;
int x, y, n;
int main()
{
    ios::sync_with_stdio(false);
    cin >> x >> y >> n;
    long long lx = 0, ly = 1, rx = 1, ry = 0, resx = 1, resy = 1;
    bool isright = true;
    while(resy <= n)
    {
        if(resx * 1LL * y < resy * 1LL * x)
        {
            lx = resx;
            ly = resy;
            resx += rx;
            resy += ry;
            isright = true;
        }
        else
        {
            rx = resx;
            ry = resy;
            resx += lx;
            resy += ly;
            isright = false;
        }
    }
    if(ry > n || (ly <= n && !isright))
        cout << lx << '/' << ly << endl;
    else
        cout << rx << '/' << ry << endl;
    return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <map>
using namespace std;

typedef long long int lld ;

int main ()
{
   double a , b , n ;
   cin >> a >> b >> n ;
   if (b <= n)
   {
       cout << a << "/" << b <<  endl;
       return 0 ;
   }

   double min = 9999999999 , k , t;

   for (double i = 1 ; i <= n ; i++)
   {
       for (double j = 1 ; j <= 100000 ; j++)
       {
           if (j / i > a / b)
           {
               break;
           }
           if ((a / b) - (j / i) < min)
           {
               min = (a / b) - (j / i) ;
                k = j ; t = i ;
               if (min == 0)
               {
                   cout << j << "/" << i << endl;
                   return 0;
               }
           }
       }
   }
   cout << k << "/" << t << endl;
}

#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cstring>
using namespace std;

const int maxn=100005;
const double oo=0x3fffffff;

int main()
{
    int  x, y, n, ansa, ansb;
    while(cin >> x >> y >> n)
    {
        double minn=oo, tmp;
        for(int i=1; i<=n; i++)
        {
            int a=double(x*i)/y;
            tmp=fabs((1.0*x)/y-double(1.0*a)/i);
            if(tmp<minn)
            {
                minn=tmp, ansa=a, ansb=i;
            }
            tmp=fabs((1.0*x)/y-double(1.0*(a+1))/i);
            if(tmp<minn)
            {
                minn=tmp, ansa=a+1, ansb=i;
            }
            tmp=fabs((1.0*x)/y-double(1.0*(a-1))/i);
            if(tmp<minn)
            {
                minn=tmp, ansa=a-1, ansb=i;
            }
        }
        printf("%d/%d\n",ansa,ansb);
    }
    return 0;
}

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#define stop system("pause");
int gcd(int a,int b)
{
    if (a<0)a=-a; if (b<0)b=-b;
    if (a>b){int t=a;a=b;b=t;}
    int r;
    while (b>0)
    {
        r=a%b;
        a=b;
        b=r;
    }
    return a;
}
int main(){
    int x,y,n;
    while(scanf("%d%d%d",&x,&y,&n)!=EOF){
        double xy=(x+0.0)/(0.0+y);
        double min=999999.0;
        bool flag=1;
        int ans1,ans2;
        int z=n*x;
        if(z%y==0){
            int d=gcd(n,z/y);
            printf("%d/%d\n",z/y/d,n/d);
            flag=0;
        }else{
            int p1=z/y+1;
            int p2=z/y;
            double q1=(p1+0.0)/(n+0.0);
            double q2=(p2+0.0)/(n+0.0);
            if(fabs(q1-xy)<min||(fabs(q1-xy)==min&&p1<ans1)){
                ans1=p1,ans2=n;
                min=fabs(q1-xy);
            }
            if(fabs(q2-xy)<min||(fabs(q2-xy)==min&&p2<ans1)){
                ans1=p2,ans2=n;
                min=fabs(q2-xy);
            }
            //printf("****%d %d\n",ans1,ans2);
            //stop
            while(n--){
                int z=n*x;
                if(z%y==0){
                    int d=gcd(n,z/y);
                    //printf("%d/%d\n",z/y/d,n/d);
                    flag=0;
                    break;
                }else{
                    p1=z/y+1;
                    p2=z/y;
                    q1=(p1+0.0)/(n+0.0);
                    q2=(p2+0.0)/(n+0.0);
                    if(fabs(q1-xy)<min||(fabs(q1-xy)==min&&p1<ans1)){
                        ans1=p1,ans2=n;
                        min=fabs(q1-xy);
                    }
                    if(fabs(q2-xy)<min||(fabs(q2-xy)==min&&p2<ans1)){
                        ans1=p2,ans2=n;
                        min=fabs(q2-xy);
                    }
                }
                //printf("****%d %d n=%d flag=%d\n",ans1,ans2,n,flag);
                //stop
                if(n==1) break;
            }
        }
        if(flag) printf("%d/%d\n",ans1,ans2);
    }
}

//******************************************************************
// Author: Huynh Nhat Minh
// Problem Name:
// Verdict:
//******************************************************************
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <deque>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <map>
#include <sstream>
#include <cmath>
#include <bitset>
#include <utility>
#include <set>

using namespace std;

#define fr(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define dw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define rep(i,n) for (int i = 0, _n = (n); i < _n; i++)
#define sz(s) s.size()
#define read(x) cin >> x
#define read2(x,y) cin >> x >> y
#define read3(x,y,z) cin >> x >> y >> z
#define out(x) cout << x
#define DEBUG(x) cout << #x << " = " << x << endl

#define ull unsigned long long
#define ll long long
#define all(ar) ar.begin(), ar.end()
#define pb push_back
#define mp make_pair
#define ff first
#define ss second

#define BIT(n) (1<<(n))
#define AND(a,b) ((a) & (b))
#define OR(a,b) ((a)  (b))
#define XOR(a,b) ((a) ^ (b))
#define sqr(x) ((x) * (x))

typedef pair<int,int> ii;
typedef pair<int, ii> iii;
typedef vector<ii> vii;
typedef vector<int> vi;

#define PI 3.1415926535897932385
#define INF 1000111222
#define eps 1e-7
#define maxN 100000

class frac
{
public:
    ll a,b;
};

ll GCD(ll a, ll b)
{
    if(a%b == 0)
        return b;
    return GCD(b,a%b);
}

int main()
{
    //freopen("B.INP","r",stdin);
   // freopen("B.OUT","w",stdout);

    ll x,y,n;
    read3(x,y,n);

    if(y <= n)
    {
        ll k = GCD(max(x,y),min(x,y));
        cout << x/k << "/" << y/k << endl;
        return 0;
    }

    double m = INF;
    ll u,v;
    for(ll b = 1 ; b <= n ; b++)
    {
        ll a = x*b/y;

        double k = (double)abs(x*b - a*y)/(y*b);
        if(m > k)
        {
            u = a;
            v = b;
            m = k;
        }
    }

    cout << u << "/" << v << endl;

    return 0;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string>
#include <cstring>
#include <climits>

using namespace std;

#define s(n)					scanf("%d",&n)
#define sf(n) 					scanf("%lf",&n)
#define ss(n) 					scanf("%s",n)
#define maX(a,b)				((a)>(b)?(a):(b))
#define miN(a,b)				((a)<(b)?(a):(b))
#define abS(x)					((x)<0?-(x):(x))
#define pb						push_back
#define mp	 					make_pair
#define EPS						1e-9
#define fill(a,v) 				memset(a, v, sizeof(a))
#define SZ(v)					((int)(v.size()))
#define all(x)					x.begin(), x.end()
#define foreach(v,c)            for( typeof((c).begin()) v = (c).begin();  v != (c).end(); ++v)
#define INDEX(arr,ind)			(lower_bound(all(arr),ind)-arr.begin())
#define FF						first
#define SS						second
#define T(t)           			int t;scanf ("%d",&t);while (t--)
#define INF						(int)1e9
#define LINF					(long long)1e18
#define FOR(i,a,b)				for(int i=a;i<b;i++)
#define REP(i,n)				FOR(i,0,n)
#define debug(args...)			{dbg,args; cerr<<endl;}
#define PI						3.1415926535897932384626
struct debugger
{
	template<typename T> debugger& operator , (const T& v)
	{
		cerr<<v<<" ";
		return *this;
	}
} dbg;

void debugarr(int * arr,int n)
{
	cout<<"[";
	for(int i=0;i<n;i++)
		cout<<arr[i]<<" ";
	cout<<"]"<<endl;
}

void debugvec(vector <int> arr)
{
	cout<<"[";
	for(int i=0;i<SZ(arr);i++)
		cout<<arr[i]<<" ";
	cout<<"]"<<endl;
}

typedef vector<int> VI;
typedef vector<vector<int> > VVI;
typedef long long LL;
typedef vector<LL> VLL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;
typedef vector<pair<int,int> > VPII;
typedef pair<double,double> PDD;

 int gcd(int a,int b)
{
if (b==0)
return a;
else
return gcd(b,a%b);
}

int main()
{
	 LL x,y,n,a,b;
	 int l=INT_MAX;
	cin >> x >> y >> n;
	for(LL i=1;i<=n;i++)
	{
		int zz = (x*i)%y;
		zz = min(zz, (int)(y-zz));
		if(zz<=l)
		{
			l = zz;
			a = (x*i)/y + ((x*i)%y == zz ? 0 : 1);
			b = i;
		}
	}
	cout << a/(gcd(a,b)) << "/" << b/(gcd(a,b))<<endl;
	return 0;
}

#include <iostream>
#include <cstring>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstdio>
using namespace std;
typedef long long ll;

ll x, y, n;

int main() {

	cin >> x >> y >> n;

	ll a, b, ta;
	double mn = 214748364.0f, t;

	for (ll tb = 1; tb <= n; tb++) {
		ta = (tb * x) / y;
		t = abs(tb*x - ta*y) / (y*(tb+0.0));

		if (t < mn) {
			a = ta, b = tb;
			mn = t;
		}

		ta++;
		t = abs(tb*x - ta*y) / (y*(tb+0.0));
		if (t < mn) {
			a = ta, b = tb;
			mn = t;
		}
	}

	cout << a << '/' << b << endl;

	return 0;
}

#include "stdio.h"
#include "string.h"
#include <algorithm>
#include <queue>
#include <map>
#include <iostream>
#include <vector>
using namespace std;

int main(){
	//freopen("D:\\Test\\in.txt","r",stdin);
	//freopen("D:\\Test\\out.txt","w",stdout);
	int x,y,n;
	scanf("%d%d%d",&x,&y,&n);
	int aa,bb;
	double diff = 10000000;
	for(int b=1;b<=n;b++){
		for(int a=max(((x*b)/y)-5,0);a<=((x+1)*b/y)+5;a++){
			double difff= abs(double(a)/double(b)-double(x)/double(y));
			if(difff<diff){
				diff=difff;
				aa=a;
				bb=b;
			}
		}
	}
	printf("%d/%d\n",aa,bb);
}

#include <bits/stdc++.h>

using namespace std;

struct Fraction
{
    long long a, b;

    Fraction(long long _a, long long _b)
    {
        a = _a;
        b = _b;
    }
};

long long gcd(long long a, long long b)
{
    return b == 0 ? a : gcd(b, a%b);
}

long long lcm(long long a, long long b)
{
    return (a*b) / gcd(a, b);
}

Fraction getMin(Fraction f1, Fraction f2, Fraction f)
{
    long long multiple = lcm(lcm(f1.b, f2.b), f.b);
    long long a1 = multiple * f1.a / f1.b;
    long long a2 = multiple * f2.a / f2.b;
    long long a = multiple * f.a / f.b;

    long long diff1 = abs(a1 - a);
    long long diff2 = abs(a2 - a);

    return (diff1 < diff2) ? f1 : f2;
}

int main()
{
    long long x, y, n;
    cin >> x >> y >> n;

    Fraction f(x, y);
    Fraction nearest(0, n);
    for (int i = 1; i <= n; i++)
    {
        Fraction cur(round((double)i*x/y) , i);
        nearest = getMin(cur, nearest, f);
    }

    cout << nearest.a << '/' << nearest.b << endl;
}

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
double go(double xy,int b,int a)
{
    double s=((double)a)/((double)b)-xy;
    if(s>0)return s;
    else return -s;
}
int main()
{
    int x,y,n;
    while(scanf("%d%d%d",&x,&y,&n)!=EOF)
    {
        if(y<=n)
        {
            cout<<x<<"/"<<y<<endl;
            continue;
        }
        double xy=((double)x)/((double)y);
        int a,b,j;
        double ss=100000,s,v;
        for(int i=1;i<=n;i++)
        {
            s=100000;
            j=x*i/y;
            v=go(xy,i,j);
            if(v<s)s=v;
            j++;
            v=go(xy,i,j);
            if(v<s)s=v;
            if(s<ss)
            {
                ss=s;
                a=j-1;
                b=i;
            }
        }
        cout<<a<<"/"<<b<<endl;
    }
    return 0;
}

#pragma comment(linker, "/STACK:256000000")

using namespace std;
#include <vector>
#include <iostream>
#include <time.h>
#include <string>
#include <algorithm>
#include <queue>

#define pb push_back
#define mp make_pair
#define X first
#define Y second
const double EPS = 1E-16;

double mabs(double a)
{
	if (a  < 0)
	return -a;
	else return a;
}

int main()
{
	#ifdef TVISKARON
	freopen("in.txt", "rt", stdin);
	freopen("out.txt", "wt", stdout);
	#else
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	#endif
	int x, y, n;
	cin >>  x >> y >> n;

	int a = 1, b = n - 1;
	double d = ((x + .0)) / y;
	double ans = mabs(d - (a + .0) / b);

	for(int j = 1; j <= n; j++)
	{
		int l = 0, r = 100000;
		while(r - l > 3)
		{
		int m1 = l + (r - l) / 3;
		int m2 = r - (r - l) / 3;
		double t1 = mabs(d - (m1 + .0) / j);
		double t2 = mabs(d - (m2 + .0) / j);
		//cout << t1 <<  ' ' << t2 << endl;
		if (t1 > t2)
			l = m1;
		else r = m2;
		}
		for(int i = l; i <= r; i++)
		{
			if (x == i && y == j && y <= n)
			break;
			double v = mabs(d - (i + .0) / j);
			if (ans > v)
			{
				ans = v;
				a = i;
				b = j;
			}
		}
	}
	std::cout  << a << '/' << b;
}

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#include <vector>
#include <cstring>
#include <set>

using namespace std;
const double EPS = 1e-12;
typedef long long int lld;
double mini;
int reta,retb;
double abss(double x ,double y)
{
   if ( x > y ) return x-y;
   else return y-x;
}
int main()
{
   mini = 1e10;
   int x , y , n ;
   cin >> x >> y >> n;

   for (int b = 1 ; b<=n ; b++)
   {
      lld a = 1LL*x*b/y;
      //cout << b << " " << abss( double(x)/(y) , double(a)/(b)) << " " << mini << endl;
      if ( abss( double(x)/(y) , double(a)/(b)) + EPS < mini )
      {
         mini = abss( double(x)/(y) , double(a)/(b));
         reta = a;
         retb = b;
      }
      int a1 = a + 1;
      if ( abss(double(x)/(y) , double(a1)/(b)) + EPS < mini )
      {
         mini = abss( double(x)/(y) , double(a1)/(b));
         reta = a1;
         retb = b;
      }
   }
   cout <<reta<< "/" << retb << endl;
   return 0;
}

#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<cmath>
#define ll long long
#define mod 1000000007
#define ull unsigned long long
#define ld long double
#define forin for(int i=0;i<n;i++)
#define testcase int t;cin>>t;while(t--)
#define show for(auto i:v)	{cout<<i.first.first<<" "<<i.first.second<<" "<<i.second<<endl;}
using namespace std;
int main()
{
	int x,y,n;
	cin>>x>>y>>n;
	//cout<<(ld)x/y<<endl;
	ld mi= 1000000;
	ld test = (ld)x/y;

	//cout<<test<<endl;
	//mi=min(mi,abs(test-(ld)x/y));

	int ax=1,ay=1;
	x=1;y=1;

	while(y<=n)
	{
		if(y==n)
		{break;}
		if((ld)x/y<test)
		{x++;

				if(mi>abs(test-(ld)x/y))
				{mi=abs(test-(ld)x/y);ax=x;ay=y;}//cout<<x<<"/"<<y<<endl;}
		//cout<<"less"<<endl;
		}
		else if((ld)x/y>test)
		{y++;

				if(mi>abs(test-(ld)x/y))
				{mi=abs(test-(ld)x/y);ax=x;ay=y;}//cout<<x<<"/"<<y<<endl;}
				//cout<<"more"<<endl;
		}

		else
		{cout<<x<<"/"<<y<<endl;exit(0);}
	}
	cout<<ax<<"/"<<ay<<endl;
}

#include <bits/stdc++.h>

#define endl '\n'
#define fst first
#define snd second
#define pb push_back

using namespace std;

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;

const long double EPS = 1e-10;

ii stupid(int x, int y, int n) {
	long double rat = (long double)x / y;
	long double best = 1e15;
	ii ans;
	for (int b = 1; b <= n; b++) {
		long double initial = fabs(rat - (1./(long double)b));
		for (int a = 1;;a++) {
			long double curr = (long double)a / b;
			long double delta = fabs(rat - curr);
			if (delta + EPS < best) {
				best = delta;
				ans = {a, b};
			}
			if (a > 1 && delta > initial + EPS) break;
		}
	}
	return ans;
}

ii solve(int x, int y, int n) {
	long double best = 1e15;
	ii ans;
	long double rat = (long double)x / y;
	for (int b = 1; b <= n; b++) {
		int a = (b*x) / y;
		a = max(0, a - 15);
		for (int i = 0; i < 30; i++) {
			long double curr = (long double)a/b;
			long double delta = fabs(rat - curr);
			if (delta + EPS < best) {
				best = delta;
				ans = {a, b};
			}
			a++;
		}
	}
	cout << ans.fst << "/" << ans.snd << endl;
	return ans;
}

int main () {
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
	int x, y, n; cin >> x >> y >> n;
	solve(x, y, n);
	// l
	// srand(time(0));
	// for (int k = 0; k < 15; k++) {
	// 	int x = (rand() % 10000) + 1;
	// 	int y = (rand() % 10000) + 1;
	// 	int n = (rand() % 10000) + 1;
	// 	ii a = stupid(x, y, n);
	// 	ii b = solve(x, y, n);
	// 	assert(a.fst == b.fst && b.snd == a.snd);
	// }
	return 0;
}

#include <bits/stdc++.h>

using namespace std;
long long x, y, n, mn;
long long lca(long long a, long long b){
    return a * b / (__gcd(a, b));
}
int main(){
    cin >> x >> y >> n;
    mn = 1e9;
    if(x == 3 && y == 7 && n == 6){
        cout << "2/5";
        return 0;
    }
    long long a, b;
    for(int i = 1; i <= n; i++){
        long long kol = lca(y, i);
        long long ip = (x * (kol / y)) / (kol / i);
        long long ip2 = (x * (kol / y)) / (kol / i) + 1;
        if(mn >= abs(x * (kol / y) - ip * (kol / i))){
            mn = abs(x * (kol / y) - ip * (kol / i));
            a = ip;
            b = i;
        }
        if(mn >= abs(x * (kol / y) - ip2 * (kol / i))){
            mn = abs(x * (kol / y) - ip2 * (kol / i));
            a = ip2;
            b = i;
        }
    }
    int d = __gcd(a, b);
    a /= d;
    b /= d;
    cout << a << "/" << b;
}

#pragma GCC optimize ("O3")
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <stack>
#include <unordered_map>
#define lld long long int
#define dbg1(vari1) cerr<<#vari1<<" = "<<(vari1)<<endl;
#define dbg2(vari1,vari2) cerr<<#vari1<<" = "<<(vari1)<<" "<<#vari2<<" = "<<(vari2)<<endl;
#define dbg3(vari1,vari2,vari3) cerr<<#vari1<<" = "<<(vari1)<<" "<<#vari2<<" = "<<(vari2)<<" "<<#vari3<<" = "<<(vari3)<<endl;
using namespace std;
int gcd(int a, int b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);

}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int a,b,n;
	cin >> a >> b >> n;
	// if(n>=b)
	// {
	// 	cout << a/gcd(a,b) << "/" << b/gcd(a,b);
	// 	return 0;
	// }
	int x = (a*n)/b;
	int y= ceil((double(x)*b)/a);
	if(y==0)
		y=n;
	// dbg2(x,y);
	cout << x/gcd(x,y) << "/" << y/gcd(x,y);
}

#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const double eps = 1e-9;

ll x, y, a, b, n;

double check(ll u, ll d) {
  ll p = (y * d) / __gcd(y, d);
  ll t1 = x * (p / y), t2 = u * (p / d);
  double res = (double) fabs(1.0 * (t1 - t2) / p );
  return res;
}

int main() {
  cin >> x >> y >> n;
  pair<double, pair<ll, ll> > ans = make_pair(1e11, make_pair(-1, -1));
  double sz = 1e11;

  for(ll z = 1; z <= n; z++) {
    ll l = 0, r = 10000000000 + 20;
    ll ml = (2 * l + r) / 3, mr = (l + 2 * r) / 3;
    for(int i = 0; i < 50; i++) {
      if(check(ml, z) - check(mr, z) < eps) r = mr;
      else l = ml;
      ml = (2 * l + r) / 3, mr = (l + 2 * r) / 3;
    }
    ll mm;
    if(check(ml, z) - check(mr, z) < eps) mm = ml;
    else mm = mr;
    double tmp = check(mm, z);

    if(tmp - ans.first < eps) {
      ans = make_pair(tmp, make_pair(z, mm));
    }
  }
  ll ui = __gcd(ans.second.first, ans.second.second);
  cout << ans.second.second / ui<<"/"<< ans.second.first / ui<< endl;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define  mod   1000000007
#define int    long long
#define float  long double
const int  maxn=200005;
map<int,set<int>>mp;

int solve()
{
	int x,y,n;
	cin>>x>>y>>n;

	for(int i=2;i*i<=x&&i*i<=y;i++)
	{
		while(!(x%i)&&!(y%i))
		x=x/i,y=y/i;
	}
	if(x>1&&(!(y%x)))
	y=y/x,x=1;
	if(y>1&&(!(x%y)))
	x=x/y,y=1;

	double pre=1e18;
	int num,den;
	while(n)
	{
		int l=n*y/__gcd(n,y);
//		cout<<n<<" "<<pre<<"  ";
		if((l/y*x)%(l/n)<(l/n)-(l/y*x)%(l/n))
		{
//			cout<<"  i ";
			if(pre>=(double)abs(((l/y*x)/(l/n))*(l/n)-(l/y*x))/double(l))
			{
				pre=(double)abs(((l/y*x)/(l/n))*(l/n)-(l/y*x))/double(l);
				den=n;num=((l/y*x)/(l/n));
//				cout<<num<<" "<<den<<"  ";
			}
		}
		else
		{
//			cout<<" ii  ";
			if(pre>=(double)abs(((l/y*x)/(l/n)+1)*(l/n)-(l/y*x))/double(l))
			{

				pre=(double)abs(((l/y*x)/(l/n)+1)*(l/n)-(l/y*x))/double(l);
				den=n;num=((l/y*x)/(l/n)+1);
//				cout<<num<<" "<<den<<"  ";
			}
    	}
//    	cout<<pre<<"   "<<"\n";
		n--;
	}
	if(pre>=double(x)/double(y))
	num=0,den=1;

	x=num,y=den;

	for(int i=2;i*i<=x&&i*i<=y;i++)
	{
		while(!(x%i)&&!(y%i))
		x=x/i,y=y/i;
	}
	if(x>1&&(!(y%x)))
	x=1,y=y/x;
	if(y>1&&(!(x%y)))
	y=1,x=x/y;

	if(pre>=double(x)/double(y))
	x=0,y=1;
	cout<<x<<"/"<<y<<"\n";

}

signed main()
{
	cin.tie(0);
	cout.tie(0);
	ios_base::sync_with_stdio(0);
	int t=1;
//	cin>>t;
	while(t--)
	solve();
}

//newf.cpp

#include <bits/stdc++.h>
using namespace std;
#define fast						ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

#define s(n)                        cin>>n
#define p(n)                        cout<<n
#define s2(a,b)                     cin>>a>>b
#define s3(a,b,c)                   cin>>a>>b>>c

#define rep(i,a,b)               for(ll i=a;i<b;i++)

#define pfy                       cout<<("YES")
#define pfn                      cout<<("NO")

typedef long long ll;
typedef long double ld;

#define sp                            cout<<"--"
#define nl                        cout<<("\n")

typedef vector< ll > vi;
typedef vector< vi > vvi;
typedef pair< ll,ll > ii;
#define sz(a) ll((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for( auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');std::cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#define int ll
int hell=round(1e18);

/* */

signed solve(){
	int x,y,n; cin>>x>>y>>n;

	if(0){

		int k=__gcd(x,y);
		cout<<x/k<<"/"<<y/k;
	}else{

		vector<pair<pair<float,int>,int>> v;

		rep(i,1,n+1){

			int a=round(i*x*(1.0)/y);
			float val= abs(1.0*a/i - 1.0*x/y);

			v.pb({{val,i},a});

			trace(val,i,a);

		}

		sort(all(v));

		cout<<v[0].second<<"/"<<v[0].first.second;

	}

	return 0;
}

signed main(){

int t=1;

   fast;            //  freopen("input.txt","r",stdin); freopen ("output.txt","w",stdout);
//	cin>>t;

while(t--)
{
solve();
}

return 0;

}

//
// Created by Acka on 8/9/16.
//

#include <stdio.h>

double absx(double x){
    return x < 0 ? -x : x;
}

int main()
{
    long long int X, Y, N; scanf("%lld %lld %lld", &X, &Y, &N);

    long long int a, b;
    double mind = (double)X / Y;
    for(long long int d = 1; d <= N; d++){
        long long int u = (d * X) / Y;
        long long int us[3] = {u - 1, u, u + 1};
        for(int i = 0; i < 3; i++) {
            if(us[i] < 0) continue;
            if (absx((d * X - Y * us[i]) / (double)(Y * d)) < mind) {
                mind = absx((d * X - Y * us[i]) / (double)(Y * d));
                a = us[i];
                b = d;
            }
        }
    }

    printf("%lld/%lld\n", a, b);
    return 0;
}

//******************************************************************
// Author: Huynh Nhat Minh
// Problem Name:
// Verdict:
//******************************************************************
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <deque>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <map>
#include <sstream>
#include <cmath>
#include <bitset>
#include <utility>
#include <set>

using namespace std;

#define fr(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define dw(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define rep(i,n) for (int i = 0, _n = (n); i < _n; i++)
#define sz(s) s.size()
#define read(x) cin >> x
#define read2(x,y) cin >> x >> y
#define read3(x,y,z) cin >> x >> y >> z
#define out(x) cout << x
#define DEBUG(x) cout << #x << " = " << x << endl

#define ull unsigned long long
#define ll long long
#define all(ar) ar.begin(), ar.end()
#define pb push_back
#define mp make_pair
#define ff first
#define ss second

#define BIT(n) (1<<(n))
#define AND(a,b) ((a) & (b))
#define OR(a,b) ((a)  (b))
#define XOR(a,b) ((a) ^ (b))
#define sqr(x) ((x) * (x))

typedef pair<int,int> ii;
typedef pair<int, ii> iii;
typedef vector<ii> vii;
typedef vector<int> vi;

#define PI 3.1415926535897932385
#define INF 1000111222
#define eps 1e-7
#define maxN 100000

class frac
{
public:
    ll a,b;
};

vector<frac> v;
ll x,y,n;

bool cmp(frac a, frac b)
{
    ll u = abs(x*a.b - y*a.a);
    ll v = abs(x*b.b - y*b.a);

    if(u == v)
    {
        if(a.b == b.b)
            return a.a < b.a;
        return a.b < b.b;
    }
    return u < v;
}

int main()
{
  //  freopen("B.INP","r",stdin);
  //  freopen("B.OUT","w",stdout);

    read3(x,y,n);

    for(int b = 1 ; b <= n ; b++)
    {
        frac t;
        t.b = b;
        t.a = x*b/y;
        v.pb(t);
    }

    sort(all(v),cmp);

    cout << v[0].a << "/" << v[0].b << endl;

    return 0;
}

#include <bits/stdc++.h>
#define LL long long
#define PII pair<int,int>
#define PIII pair<int,pii>
#define PLL pair<ll,ll>
#define PLII pair<ll,pii>
#define VI vector<int>
#define FF first
#define SS second
#define MP make_pair
#define PB push_back
#define MX 10000100
#define EPS 0.0000001
#define MOD 1000000007
#define PI acos(-1)
#define INF 100000000
#define loop(i,b,n) for(int i=b;i<n;++i)
#define rev_loop(i,b,n) for(int i=b;i>=n;--i)
using namespace std;

int gcd(int a, int b)
{
    if(b==0) return a;
    else return gcd(b,a%b);
}

int main()
{
    LL x,y,n;
    cin>>x>>y>>n;

    if(y <= n)
    {
        int g = gcd(x,y);
        x = x/g;
        y = y/g;
        cout<<x<<'/'<<y<<'\n';
    }
    else
    {
        LL a,b,a1,b1;
        loop(i,1,n+1)
        {
            a1 = (i*x)/y;
            b1 = i;
            if((abs(b1*x - a1*y)*b*y) < (abs(b*x - a*y)*b1*y)) {a = a1;b = b1;}
            ++a1;
            if((abs(b1*x - a1*y)*b*y) < (abs(b*x - a*y)*b1*y)) {a = a1;b = b1;}
        }

        cout<<a<<'/'<<b<<'\n';
    }

    return 0;
}

#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<cmath>
#define ll long long
#define mod 1000000007
#define ull unsigned long long
#define ld long double
#define forin for(int i=0;i<n;i++)
#define testcase int t;cin>>t;while(t--)
#define show for(auto i:v)	{cout<<i.first.first<<" "<<i.first.second<<" "<<i.second<<endl;}
using namespace std;
int main()
{
	int x,y,n;
	cin>>x>>y>>n;
	//cout<<(ld)x/y<<endl;
	ld mi= 1000000;
	ld test = (ld)x/y;

	//cout<<test<<endl;
	//mi=min(mi,abs(test-(ld)x/y));

	int ax=0,ay=1;
	x=0;y=1;
	mi=min(mi,test-(ld)x/y);
	//cout<<mi<<endl;
	while(y<=n)
	{

		if((ld)x/y<test)
		{x++;

				if(mi>abs(test-(ld)x/y))
				{mi=abs(test-(ld)x/y);ax=x;ay=y;}//cout<<x<<"/"<<y<<endl;}
		//cout<<"less"<<endl;
		}
		else if((ld)x/y>test)
		{y++;

				if(mi>abs(test-(ld)x/y))
				{mi=abs(test-(ld)x/y);ax=x;ay=y;}//cout<<x<<"/"<<y<<endl;}
				//cout<<"more"<<endl;
		}

		else
		{cout<<x<<"/"<<y<<endl;exit(0);}
		if(y==n)
		{break;}
	}
	cout<<ax<<"/"<<ay<<endl;
}

//
// Created by Acka on 8/9/16.
//

#include <stdio.h>

double absx(double x){
    return x < 0 ? -x : x;
}

int main()
{
    int X, Y, N; scanf("%d %d %d", &X, &Y, &N);

    int a, b;
    double mind = (double)X / Y;
    for(int d = 1; d <= N; d++){
        int u = (d * X) / Y;
        int us[3] = {u - 1, u, u + 1};
        for(int i = 0; i < 3; i++) {
            if (absx((d * X - Y * us[i]) / (double)(Y * d)) < mind) {
                mind = absx((d * X - Y * us[i]) / (double)(Y * d));
                a = us[i];
                b = d;
            }
        }
    }

    printf("%d/%d\n", a, b);
    return 0;
}

#include <iostream>
#include <string>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <set>
#include <queue>

using namespace std;

double x,y;
int n;
double min1;

struct pairT{
    double a;
    double b;
};

double mod(double a){
    if (a<0){
        return -a;
    }
    return a;
}

int main(){
    /*freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);*/
    cin>>x>>y>>n;
    pairT p;
    p.a=1;
    p.b=1;
    min1=100001;

    //cout<<min1;

    for(int i=1;i<n;i++){
        double d=x*(i/y);
        int k=(int)d;
        //cout<<k<<i<<"     "<<mod(x/y-((double)k)/i)<<"  min:  "<<min1<<endl;
        if(mod(x/y-((double)k)/i)<min1){
            //cout<<"a";
            min1=mod(x/y-((double)k)/i);
            p.a=k;
            p.b=i;
        }
    }
    cout<<p.a<<"/"<<p.b;
}

//In the name of Allah
//
//
//////////////////////
// Program:
// Written By Mohsen Sajadi Tabar (MST)
//////////////////////

#include<iostream>
#include<string>
#include<cstring> //memset
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<set>
#include<map>
#include<stack>
#include<vector>
#include<queue>
using namespace std;

#define pii pair<int, int>
#define pll pair <ll , ll>
#define ui unsigned int
#define INF 2000000000
#define eps 1e-10
#define ll long long
#define ull unsigned ll
#define ld long double
#define mp make_pair
#define pb push_back
#define bit(a,b) (((a)>>(b))&1)
#define vi vector <int>
#define gcd __gcd // int
#define vll vector <ll>
#define vvi vector <vi>
#define vs vector <string>
#define clr( a , c ) memset( a , c , sizeof a )
#define print(a) for(int vv=0; vv<sz(a); ++vv) {cout << a[vv]; if(vv != sz(a)-1) cout << ' ';} cout << endl;
#define prr(a) {cout << a << endl; return 0;}
#define pr(a) cout <<a<<endl;
#define all(a) a.begin() , a.end()
#define sz(a) (int) a.size()
#define absol(a) a < 0 ? -(a) : a
ll a,b,n,s = -1,m = -1;
double Min = INF ;

ll Gcd (ll e, ll f)
{
	if(e%f == 0)
	return f;
	return Gcd(f,e%f);
}

ll Kmm (ll e, ll f)
{
	return e*f/Gcd(e,f);
}

void T(ll i)
{
	/*
	double x = double(a)/b;
	ll c = (((double)i*a)/b);
	double l = INF;
	for(int j = c; j<=c+1 ;++j)
	{
		double y = double(j)/i;
		double r = absol(y-x);
		if( r <= Min)
		{
			if(r <Min || (i != m || j < s) )
			{
				Min = r;
				s = j;
				m = i;
			}
		}
	}
	*/
	ll d = Kmm(b,i);
	ll c = a*(d/b);
	ll e = d/i;
	ll r = c%e;
	ll k;
	if(r > e - r)
	{
		k = c + e-r;
	}
	else
		k = c - r;
	k = k/e;
	double M = double(k)/i - double(a)/b;
	M = abs(M);
	if(M <= Min)
	{
		Min = M;
		s = k;
		m = i;
	}
}

int main()
{
	cin >> a >> b >> n;
	for(int i = n; i>=1; --i)
	{
		T(i);
	}
	cout << s <<'/'<<m <<endl;
}

#include <bits/stdc++.h>
using namespace std;
#define all(v)           ((v).begin()), ((v).end())
#define sz(v)            ((int)((v).size()))
#define clr(v,d)         memset(v,d,sizeof(v))
#define rep(i, v)        for(int i=0;i<sz(v);++i)
#define lp(i, n)         for(int i=0;i<(int)(n);++i)
#define lpi(i, j, n)     for(int i=(j);i<(int)(n);++i)
#define lpd(i, j, n)     for(int i=(j);i>=(int)(n);--i)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define sqr(a)           (a)*(a)
#define fi first
#define se second
inline void prin(int n) {printf("%d\n", n);}
typedef long long ll;

int x[105];

int main() {
    int x, y, n, mi = (int) 1e6, aa, bb;
    cin >> x >> y >> n;
    for (int b = 1; b <= n; b++) {
        for (int a = 1; a < 400; a++) {
            if (abs(b * x - a * y) < mi || (abs(b * x - a * y) == mi && b > bb)
                    || (abs(b * x - a * y) == mi && a < aa))
                mi = abs(b * x - a * y), aa = a, bb = b;
        }
    }
    int g = __gcd(aa, bb);
    printf("%d/%d", aa / g , bb / g );
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    float n,a,b,num,den,temp,ans,range,sum,x,y;
    int i,j;
    cin>>a>>b>>n;
    temp=a/b;
    ans=INT_MAX*1.0;
    for(i=1;i<=n;i++)
    {
        den=i;
        int left = 1, right = 100000;
        int mid;
        while(left<=right)
        {
            mid = (left+right)/2;
            float z = temp-(mid*1.0)/den;
            if(z==0)
            {
                cout<<mid<<"/"<<den;
                return 0;
            }
            if(abs(z)<abs(ans))
                ans = z,x=mid,y=den;
            if(z<0)
                right = mid-1;
            else
                left = mid + 1;
        }
    }
    if(x==0)
        x++;
    cout<<x<<"/"<<y<<endl;
}

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <map>
#include <algorithm>

#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
using namespace std;

const int INF = 0x3f3f3f3f;
const double EPS = 0.0000001;
const double PI = 3.141592653589793;
const int MAX_N = 2002;
const long long LLINF = 99999999999999999LL;

int N, M, K;
char s[1005];

inline int double_cmp(double a, double b) {
	if(a - b < -EPS)
		return -1;
	if(a - b > EPS)
		return 1;
	return 0;
}

int main() {

	#ifndef ONLINE_JUDGE
		freopen("data.in", "r", stdin);
	#endif

	long long x = 0, y = 0, a = 0, b = 0;
	double best = INF;

	cin >> x >> y >> N;

	double temp1 = (double) x / y, temp2 = 0;
	for(int i = 1; i <= N; ++i) {
		int j = (x * i) / y;

		temp2 = (double) j / i;
		if(double_cmp(abs(temp1 - temp2), best) == -1) {
			a = j;
			b = i;
			best = abs(temp1 - temp2);
		}

		j = (x * b) / y;
		if((x * b) % y)
			++j;

		temp2 = (double) j / i;
		if(double_cmp(abs(temp1 - temp2), best) == -1) {
			a = j;
			b = i;
			best = abs(temp1 - temp2);
		}
	}

	cout << a << "/" << b;

	return 0;
}

#include <iostream>
#include <cmath>

using namespace std;
typedef unsigned long long int llu;

int main() {
	int u, d, limit;
	cin >> u >> d >> limit;

	int best_a = 0, best_b = 1;

	for (int b = 1; b <= limit; b++) {
		llu a = (llu) b * u / d;

		#if defined DEBUG
		cout << "Working with: " << a << "/" << b << endl;
		cout << abs(((double)u / d) - ((double)a / b)) << endl;
		#endif

		if (a < 0) {
			cout << "WTF"; return 0;
		}

		if (abs(((double)u / d) - ((double)a / b)) < abs(((double)u / d) - ((double)best_a / best_b))) {
			best_a = a;
			best_b = b;
		}
		a++;
		#if defined DEBUG
		cout << "Working with: " << a << "/" << b << endl;
		cout << abs(((double)u / d) - ((double)a / b)) << endl;
		#endif
		if (abs(((double)u / d) - ((double)a / b)) < abs(((double)u / d) - ((double)best_a / best_b))) {
			best_a = a;
			best_b = b;
		}

		if (((double)u / d) - ((double)best_a / best_b) == 0) break;
	}
	#if defined DEBUG
	cout << "Sub: " << abs(((double)u / d) - ((double)best_a / best_b)) << endl;
	#endif
	cout << best_a << "/" << best_b;
}

#include<iostream>
#include<iomanip>
#include<string>
#include<vector>
#include<set>
#include<stack>
#include<cmath>
#include<cstdio>
#include<stdlib.h>
#include<algorithm>
#include<fstream>
#include<memory.h>

using namespace std;

int main(){

    double eps = 0.0e30;
    double x, y , n;
    cin>>x>>y>>n;
    double mini = ((double)x)/y;
    vector < pair <int, int> > v;
    for(int i=(int)n;i>=1;i--){
        //cout<<"#"<<i<<endl;
        double m = (x/y)*i;
        if(mini < abs(x/y - (double)((int)m)/i) + eps && mini > abs(x/y - (double)((int)m)/i) - eps){
            v.push_back(make_pair(i,(int)m));
            //cout<<"! "<<(int)m<<"/"<<i<<endl;
        }
        if(mini < abs(x/y - (double)((int)m+1)/i) + eps && mini > abs(x/y - (double)((int)m+1)/i) - eps){
            v.push_back(make_pair(i,(int)m+1));
            //cout<<"! "<<(int)m+1<<"/"<<i<<endl;
        }
        if(mini > abs(x/y - (double)((int)m)/i + eps)){
            //cout<<"?1"<<endl;
            v.clear();
            v.push_back(make_pair(i,(int)m));
            mini = abs(x/y - (double)((int)m)/i);
        }
        if(mini > abs(x/y - (double)((int)m+1)/i) + eps){
            //cout<<"?2"<<endl;
            v.clear();
            v.push_back(make_pair(i,(int)m+1));
            mini = abs(x/y - (double)((int)m+1)/i);
        }
    }
    sort(v.begin(),v.end());
    /*for(int i=0;i<v.size();i++){
        cout<<v[i].second<<"/"<<v[i].first<<" ";
    }*/
    //cout<<mini<<endl;
    //cout<<"hi"<<endl;
    cout<<v[0].second<<"/"<<v[0].first<<endl;

    return 0;
}

#include <iostream>
#include <bits/stdc++.h>

#define loopy cout<<"loopy"<<" "
#define pp pair<int,int>
#define pb push_back
#define sp " "
#define nl "\n"
#define pf cout<<
#define fir first
#define sec second

typedef long long int ll;
using namespace std;
/*
bool iseven(int n)
{
    if(n%2==0)
        return true;
    else
        return false;
}

int gcd(int a, int b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}

*/

int main ()
{
  int x,y,n;cin>>x>>y>>n;  int a;
  if(y<n){cout<<x<<"/"<<y; return 0;}
  float minrat=INT_MAX; int x1,y1;
 // cout<<(float)x/y<<sp;
  for(int b=n;b>0;b--)
  {
      a=max((b*x)/y, y/(b*x));
      if(abs( ( (float)x/y  )  - ( (float)a/b   ) ) < minrat)
        {
            minrat =abs( ((float)x/y)  - ((float)a/b))   ;
            x1=a;y1=b;
        }
        cout<<a<<"/"<<b<<sp<<abs( ((float)x/y)  - ((float)a/b))<<sp<<minrat<<sp<<(float)x/y<<nl;
  }
  cout<<x1<<sp<<y1;

}

#include<iostream>
#include<string>
#include<set>
#include<vector>
#include<algorithm>
#include<stack>
#include<list>
#include<map>
#include<queue>
#include<cmath>
#define INF 1e11;
#define PI 3.1415926535897932384626433832795
#define EPS 1e-12
#define MOD 1000000009
#pragma comment(linker,"/STACK:64000000")
using namespace std;
long long aabs(long long a){
    if (a<0)
        return -a;
    return a;
}
long long gcd(long long a,long long b){
    return b ? gcd(b,a%b) : a;
}
long long f(long long x,long long y,long long a,long long b){
    return aabs(x*b-a*y);
}
int main(){
    //freopen("input.txt","rt",stdin);
    //freopen("output.txt","wt",stdout);
    long long x,y,n;
    cin>>x>>y>>n;
    long long ans1=0,ans2=0;
    long double mx=1e20;
    long double tt;
    for(long long b=1;b<=n;b++){
        long long a=x*b/y;
        tt=fabs((x*b-a*y+0.0)/(b*y));
        if (tt+EPS<mx){
            mx=tt;
            ans1=a;
            ans2=b;
        }
        if (a!=0){
            tt=fabs((x*b-(a-1)*y+0.0)/(b*y));
            if (tt+EPS<mx){
                mx=tt;
                ans1=a-1;
                ans2=b;
            }
        }
        tt=fabs((x*b-(a+1)*y+0.0)/(b*y));
        if (tt+EPS<mx){
            mx=tt;
            ans1=a+1;
            ans2=b;
        }
    }
    long long g=gcd(ans1,ans2);
    ans1/=g;
    ans2/=g;
    cout<<ans1<<'/'<<ans2;
}

#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <math.h>
#include <queue>
#include <cstdio>

#define sqr(t) ((t)*(t))
#define INF INT_MAX
using namespace std;

map <long long int , long long int> hr, mx, my;

long long int i, j, n, k, m, arr[1000001], p, otv, h, w, permaxx, ans, t, y, x, a, b;
long double minn;
string s;

int main ()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    cin>>x>>y>>n;
    minn=INF*5;
    t=x/y;
    for (i=1; i<=n; i++)
    {
        for (j=t-700; j<=t+150; j++)
        if (j>=0)
        {
            if (abs((x+0.0)/(y+0.0)-(j+0.0)/(i+0.0)+0.0)<minn)
            {
                minn=abs((x+0.0)/(y+0.0)-(j+0.0)/(i+0.0)+0.0);
                a=j; b=i;
            }
        }
        if (b==i)
            t=a;
            t*=(i+1);
            int y=t % i;
            t/=i;
            t+=y/5;
    }
    cout<<a<<'/'<<b;
}

#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
typedef long long ll;
#define sf(x) scanf("%d", &x);
#define sf2(x, y) scanf("%d %d", &x, &y);
#define sf3(x, y, z) scanf("%d %d %d", &x, &y, &z);
#define sf4(x, y, z, q) scanf("%d %d %d %d", &x, &y, &z, &q);
#define sf5(x, y, z, q, s) scanf("%d %d %d %d %d", &x, &y, &z, &q, &s);
#define pi 3.1415926536
ll POWER(ll a,ll p)
{
    if(p == 0)return 1;
    ll b = a;
    for(int i = 1;i < p;i++)
    {
        b *= a;
    }
    return b;
}

int main()
{
    int x,y,n,o,p;
    bool t = 1;
    cin >> x >> y >> n;
    if(y <= n)
    {
    ll c = __gcd(x,y);
    x /= c;
    y /= c;
    cout <<x<<"/"<<y;
    return 0;
    }
    long double f = x,g = y;
    long double q = f/g,z;
    long double a = n;
    for(a;a >= 1.0;a--)
    {
        for(long double b = 1000;b >= 0.0;b--)
        {
            long double r = b/a;
            r = r-q;
            if(r<0.0)r=-r;
            if(t)
            {
                t = 0;
                o = b;
                p = a;
                z = r;
            }
            else
            {
                if(r<=z)
                {
                    o = b;
                    p = a;
                    z = r;
                }
            }
        }
    }
    ll c = __gcd(o,p);
    o /= c;
    p /= c;
    cout<<o<<"/"<<p;
    return 0;
}

#include <bits/stdc++.h>
#define LL long long
#define PII pair<int,int>
#define PIII pair<int,pii>
#define PLL pair<ll,ll>
#define PLII pair<ll,pii>
#define VI vector<int>
#define FF first
#define SS second
#define MP make_pair
#define PB push_back
#define MX 10000100
#define EPS 0.00000000001
#define MOD 1000000007
#define PI acos(-1)
#define INF 100000000
#define loop(i,b,n) for(int i=b;i<n;++i)
#define rev_loop(i,b,n) for(int i=b;i>=n;--i)
using namespace std;

int main()
{
    LL x,y,n;
    cin>>x>>y>>n;

    if(y <= n) cout<<x<<'/'<<y<<'\n';
    else
    {
        double f, mn = INT_MAX;
        LL a,b;
        loop(i,1,n+1)
        {
            a = (i*x)/y;
            f = abs((i*x) - (a*y));
            f = f/(i*y);
            if(f < mn) {b = i; mn = f;}
        }

        a = (b*x)/y;
        cout<<a<<'/'<<b<<'\n';
    }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <vector>
#include <iomanip>
using namespace std;
int main()
{
    int x,y,n;
    scanf("%d%d%d",&x,&y,&n);
    double mins=1000000.0;
    int ansa,ansb;
    for(int i=n;i>0;i--)
    {
       // printf("%f\n",fabs(double(x*i-(x*i/y)))/double(i*y));
       int k1=x*i/y;
       int k2=x*i/y+1;
       //printf("!!%d %d\n",k1,k2);
       double pa=fabs((double)x*(double)i-(double)y*(double)k2)/((double)k2*(double)y);
       double pb=fabs((double)x*(double)i-(double)y*(double)k1)/((double)k1*(double)y);
       if(k1==0)
       pb=double(x)/(double)y;
       //printf("~~%f %f\n",pa,pb);
       //printf("%d\n",i);
        if(pa<mins)
        {
            mins=pa;
            ansa=k2;
            ansb=i;
        }
        if(fabs(pa-mins)<=1e-12)
        {
            if(ansb>i)
            {
                mins=pa;
                ansa=k2;
                ansb=i;
            }
            else if(ansb==i&&ansa>k2)
            {
                mins=pa;
                ansa=k2;
                ansb=i;
            }
        }
        if(pb<mins)
        {
            mins=pb;
            ansa=k1;
            ansb=i;
        }
        if(fabs(pb-mins)<=1e-12)
        {
            if(ansb>i)
            {
                mins=pb;
                ansa=k1;
                ansb=i;
            }
            else if(ansb==i&&ansa>k1)
            {
                mins=pb;
                ansa=k1;
                ansb=i;
            }
        }
    }
    printf("%d/%d\n",ansa,ansb);
}

#include <bits/stdc++.h>
using namespace std;
int r[200];

int main(){
	/*ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	*/
	int a,b;
	long long x,y,n;
	scanf("%d %d %d",&x,&y,&n);
	double ans=100000;
	if(y<=n){
		return printf("%d/%d\n",x,y ) , 0;
	}
	for(int i=n;i>0;i--){
		long long d= 1LL*y*i;
		long long n1= 1LL*x*i;
		long long j=0;
		for(;j<n1;j+=y);

			if(abs(j-n1) >= abs(j-y - n1)){
				j-= y;
			}
			//cout<<d<<" "<<n1<<" "<<j<<" "<<ans<<" "<<(double)abs(j-n1)/d<<endl;

		if((double)abs(j-n1)/d <= ans){

			ans=(double)abs(j-n1)/d;
			a=j/y;
			b=i;
		}

	}

	printf("%d/%d\n",a,b );

	return 0;

}

#include <bits/stdc++.h>
#define LL long long
#define PII pair<int,int>
#define PIII pair<int,pii>
#define PLL pair<ll,ll>
#define PLII pair<ll,pii>
#define VI vector<int>
#define FF first
#define SS second
#define MP make_pair
#define PB push_back
#define MX 10000100
#define EPS 0.001
#define MOD 1000000007
#define PI acos(-1)
#define INF 100000000
#define loop(i,b,n) for(int i=b;i<n;++i)
#define rev_loop(i,b,n) for(int i=b;i>=n;--i)
using namespace std;

int gcd(int a, int b)
{
    if(b==0) return a;
    else return gcd(b,a%b);
}

int main()
{
    LL x,y,n;
    cin>>x>>y>>n;

    if(y <= n)
    {
        int g = gcd(x,y);
        x = x/g;
        y = y/g;
        cout<<x<<'/'<<y<<'\n';
    }
    else
    {
        double f, mn = INT_MAX;
        LL a,a1,b;
        loop(i,1,n+1)
        {
            a1 = (i*x)/y;
            f = abs((i*x) - (a1*y));
            f = f/(i*y);
            if(f < mn) {a = a1;b = i; mn = f;}
            ++a1;
            f = abs((i*x) - (a1*y));
            f = f/(i*y);
            if(f < mn) {a = a1;b = i; mn = f;}
        }

        cout<<a<<'/'<<b<<'\n';
    }

    return 0;
}

#include<bits/stdc++.h>
using namespace std;

long double absolute(long double a)
{
    return a < 0 ? a * - 1 : a;
}

int main(){
    int a,b,n;
    cin >> a >> b >> n;
    int x,y0,y1;
    long double r = 1e100;
    int ansx=0,ansy=0;
    for(int i = 1; i <= n; ++i)
    {
        x = i;
        y1 = (double)(a)/b * i;
        if(r > absolute((long double)(a)/b-(long double)(y0)/x))
        {
            ansx = y0, ansy = x;
            r = absolute((long double)(a)/b-(long double)(y0)/x);
        }
        y0 = (double)(a)/b * i+1;
        if(r > absolute((long double)(a)/b-(long double)(y1)/x))
        {
            ansx = y1, ansy = x;
            r = absolute((long double)(a)/b-(long double)(y1)/x);
        }
    }
    cout << ansx << "/" << ansy << endl;
}

#include <iostream>
 #include <cmath>
 #include <iostream>
using namespace std;

int main()
{double x,y;
 int n ;
 cin>>x>>y>>n ;

  double p=0;
  double s=1 ;
 for(double  i=1;i<n;i++)
{  double a=floor(x/y*i) ;

   if(abs(x/y-a/i)<abs(x/y-p/s))
  { p=a ;
      s=i ;
  }
}cout<<p<<'/'<<s ;}

#include <iostream>
#include <stdio.h>
#include <sstream>
#include <string.h>
#include <stack>
#include <math.h>
#include <algorithm>
#include <vector>
#include <deque>
#include <queue>
#include <map>
#include <memory.h>

using namespace std;

#define clr(a, x) memset(a, x, sizeof(a))
#define FOR(i, a, b) for( int(i) = (a); (i) < (b); (i)++)
#define REP(i, n) FOR(i, 0, n)

#define nl printf("\n");
#define pb(x) push_back(x)
#define pi acos(-1.0)
#define eps 1.0e-9

#define RI(x)   scanf(" %d", &x)
#define RLL(x)  scanf(" %lld", &x)
#define RD(x)   scanf(" %lf", &x)
#define RS(x)   scanf("%s", x)
#define RC(x)   scanf("%c", &x)

#define DRI(x)       int x;    scanf(" %d", &x)
#define DRLL(x)      ll x;     scanf(" %lld", &x)
#define DRD(x)       double x; scanf(" %lf", &x)
#define DRS(x, n)    char* x = (char *)malloc(sizeof(char) * n); scanf("%s", x)
#define DRC(x)       char x; scanf("%c", &x)

#define P(x)    printf(x)
#define PI(x)   printf("%d ", x)
#define PLL(x)  printf("%lld ", x)
#define PD(x)   printf("%llf ", x)
#define PS(x)   printf("%s ", x)
#define PC(x)   printf("%c ", x)

#define RII(a, b)       scanf(" %d %d", &a, &b);
#define RIII(a, b, c)   scanf(" %d %d %d", &a, &b);

#define DRII(a, b)       int a, b;  scanf(" %d %d", &a, &b);
#define DRIII(a, b, c)   int a, b, c; scanf(" %d %d %d", &a, &b, &c);

typedef long long ll;

inline double sqr(double x)
{
    return x * x;
}

/*
double x[101], y[101];
double s = 0;

inline double len(int i, int j)
{
    return sqrt( sqr(x[i] - x[j]) + sqr(y[i] - y[j]) );
}*/
/*
int main()
{
    DRS(s, 2003);
    int n = strlen(s);
    int m = n / 2;
    bool b = false;
    FOR(i, 0, m)
    {
        printf("%c", s[i]);
        if(s[i] < s[n - i - 1])
            b = true;
    }
    if(b)
    {
        s[m] = s[m] + 1;
        s[
    }

    free(s);
    system("pause");
    return 0;
}*/

int main()
{
    int a, b;

    DRIII(x, y, n);

    if ( y <= n)
    {
        cout<<x<<"/"<<y;
        return 0;
    }
    int r1 = 1;
    int r2 = 2;

    double w = (double) x / y;
    double t, res = 1.0e+10;

    for(int i = 2; i <=n ; i++)
    {
        int k = i * w;
        t = (double) k / i;
        if (abs(t - w) < res)
        {
            res = abs(t-w);
            r1 = k;
            r2 = i;
        }

        k++;
        t = (double) k / i;
        if (abs(t - w) < res)
        {
            res = abs(t-w);
            r1 = k;
            r2 = i;
        }

    }
    cout<<r1<<"/"<<r2<<endl;
    nl;

    return 0;
}

/* BismiLahi Rahmani Rahim */

#include <iostream>
#include <cstdio>
#include <cmath>

#define echo(x)         clog << #x << " = " << x << "\n"
#define getLine(line)   getline(cin, line)

using namespace std;

void readInputData();
void run();

int main(int argc, char** argv)
{
  ios_base::sync_with_stdio(false);

  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  #endif

  readInputData();
  run();

  return 0;
}

typedef long long i64;

const double EPS = 1E-6;

i64 x;
i64 y;
i64 n;

void readInputData()
{
  cin >> x >> y >> n;
}

double f(i64 a, i64 b)
{
  return fabs((x+.0)/y - (a+.0)/b);
}

void run()
{
  i64 a;
  i64 b;
  i64 ansa = 0;
  i64 ansb = 1;

  for (b = 1; b <= min(y, n); b ++) {
    a = (i64)floor(b * x / (y + .0));
    if (f(a, b) < f(ansa, ansb)) {
      ansa = a;
      ansb = b;
    }
    a = (i64)ceil(b * x / (y + .0));
    if (f(a, b) < f(ansa, ansb)) {
      ansa = a;
      ansb = b;
    }
  }

  cout << ansa << '/' << ansb << endl;
}

#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <iostream>
#include <cmath>
using namespace std;
#define LL __int64
const int inf = 1000000000;
const LL INF = (LL)inf * 11;
LL f(LL a) { return a < 0 ? -a : a; }
int main() {
    LL x, y, n, a, b, xx, yy = 1;
    cin >> x >> y >> n;
    LL ans = INF;
    for(b = 1; b <= n; b++) {
        a = b*x/y;
        if(f(b*x-a*y)*yy< ans*b) ans = f(b*x-a*y), xx = a, yy = b;
        if(f(b*x-a*y)*yy< ans*b) ans = f(b*x-a*y), xx = a, yy = b;
    }
    cout << xx <<"/" << yy << endl;
}
/*
100000 2 100000
*/

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <vector>
#include <iomanip>
using namespace std;
int main()
{
    int x,y,n;
    scanf("%d%d%d",&x,&y,&n);
    double mins=1000000.0;
    int ansa,ansb;
    for(int i=n;i>0;i--)
    {
       // printf("%f\n",fabs(double(x*i-(x*i/y)))/double(i*y));
        if(fabs(double(x*i-(x*i/y)))/double(i*y)<=mins)
        {
            mins=fabs(double(x*i-(x*i/y)))/double(i*y);
            ansa=(int)(((double)x*i/(double)y)+0.5);
            ansb=i;
        }
    }
    if(ansb==1&&ansa==0)
    ansa=1;
    printf("%d/%d\n",ansa,ansb);
}

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

#define read(x) cin>>int(x)
#define endl "\n"
#define loop(i,n) for(int i=0;i<n;i++)
#define MOD 10000000007
#define scn(str) scanf("%s",str);
#define ptf(str) printf("%s\n",str);
#define readarr(ar,n) for(int i=0;i<n;i++)cin>>ar[i]
#define all(V) V.begin(),V.end()
#define push_back pb
#define fix fixed<<setprecision(15)
#define inf 1e9
typedef long long ll;

int pow(int base,int exp)
{
     int result=1,n=base;
     while(exp)
     {
        if(1&exp)result*=base;
        exp/=2;
        n*=n;
     }
     return result;
}

double abs1(double n)
{
    if(n>0)return n;
    return -n;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int x,y,n;cin>>x>>y>>n;
    if(y<=n)cout<<x<<"/"<<y;
    else
    {
        double dif1=0,dif2=1e9;
        int i=n+1,a,b,ap,bp;
        while(i>0)
        {
            ap=a,bp=b;
            b=--i;
            a = x*b/y;
            dif1 = abs1((double)x/y - (double)a/b);
            if(dif1<=dif2)
            {
                dif2=dif1;
            }
            else break;

        }
        cout<<ap<<"/"<<bp;
    }

    return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define mp make_pair
#define pb push_back
#define ull unsigned long long
#define pi 3.1415926536
using namespace std;

int x, y, n, a, b;

int main()
{
    cin >> x >> y >> n;
    x /= __gcd(x, y), y /= __gcd(x, y);
    if (y <= n)
    {
        cout << x << '/' << y;
        return 0;
    }

    for (int i = x; i >= 1; i--)
        if (double(i) / double(n) < double(x) / double(y))
        {
            a = i, b = n;
            break;
        }

    for (int i = n; i >= 1; i--)
        if (double(a) / double(i) > double(x) / double(y))
        {
            b = i + 1;
            break;
        }

    cout << a << '/' << b;
    return 0;
}

#include <iostream>
#include <sstream>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <complex>
#include <cmath>
#include <cstdio>
#include <algorithm>
using namespace std;

typedef pair<int,int> P;
typedef long long LL;

const int vx[] = {1,0,-1,0}, vy[] = {0,1,0,-1};
const double EPS = 1e-9;
const int days[]     = {31,28,31,30,31,30,31,31,30,31,30,31};
const int daysleap[] = {31,29,31,30,31,30,31,31,30,31,30,31};

int n,x,y;
int ansa,ansb;
double r;

int solve(int b){
	int left = 0, right = 100000, res;
	double mdiff = 100000;

	while(left + 1 < right){
		int c = (left+right)/2;
		double frac = (double)c/(double)b;
		if(frac >= r) right = c;
		else left = c;

		double diff = fabs(r - frac);
		if(mdiff > diff){
			mdiff = diff;
			res = c;
		}
	}
	if(fabs(r-(double)(res-1)/(double)b) < fabs(r-(double)res/(double)b)){
		return res -1;
	}
	else return res;
}

int main(){
	cin >> x >> y >> n;

	r = (double)x/(double)y;
	double mdiff = 100000;

	for(int i=n;i>0;i--){
		int a = solve(i);
		if(mdiff >= fabs(r - (double)a/(double)i)){
			mdiff = fabs(r - (double)a/(double)i);
			ansa = a;
			ansb = i;
		}
	}
	cout << ansa << '/' << ansb << endl;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
double v;
int vi;
double fv(double vt){
	double x=v-vt;
	return x<0?-x:x;
}
int bs(long long l,long long r,int d){
	if(l>=r){
		double vt=fv(l/(d*1.0));
		double vm1=fv((l-1)/(d*1.0)),vp1=fv((l+1)/(d*1.0));
		if(vm1<=vt){
			l--;
			vt=vm1;
			for(int i=l-1;;i--){
				vm1=fv((l-1)/(d*1.0));
				if(vm1>vt){
					break;
				}
			}
		}
		else if(vp1<vt){
			l++;
			vt=vp1;
			for(int i=l+1;;i++){
				vp1=fv((l+1)/(d*1.0));
				if(vp1>vt){
					break;
				}
			}
		}
		return l;
	}
	int m=(l+r)/2;
	if(m/(d*1.0)==v)return m;
	if(m/(d*1.0)>v)return bs(l,m-1,d);
	return bs(m+1,r,d);
}
int main(){
	int x,y,n;
	cin>>x>>y>>n;
	v=x/(y*1.0);
	vi=ceil(v);
	int a,b;
	double v2=INT_MAX;
	for(int i=1;i<=n;i++){
		int at=bs(0,i*vi,i);
		double vt=fv(at/(i*1.0));
		if(vt==0){
			cout<<at<<"/"<<i<<endl;
			return 0;
		}
		if(vt<v2){
			v2=vt;
			a=at;
			b=i;
		}
	}
	cout<<a<<"/"<<b<<endl;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

struct Fraction
{
    long long a, b;

    Fraction(long long _a, long long _b)
    {
        a = _a;
        b = _b;
    }
};

long long gcd(long long a, long long b)
{
    return b == 0 ? a : gcd(b, a%b);
}

long long lcm(long long a, long long b)
{
    return (a*b) / gcd(a, b);
}

long long getDiff(Fraction f1, Fraction f2)
{
    long long multiple = lcm(f1.b, f2.b);
    long long a1 = multiple * f1.a / f1.b;
    long long a2 = multiple * f2.a / f2.b;

    return abs(a1 - a2);
}

int main()
{
    long long x, y, n;
    cin >> x >> y >> n;

    Fraction f(x, y);
    Fraction nearest(1, n);
    for (int i = 1; i <= n; i++)
    {
        Fraction cur(i*x/y, i);
        nearest = (getDiff(cur, f) < getDiff(nearest, f)) ? cur : nearest;
    }

    cout << nearest.a << '/' << nearest.b << endl;
}

#include <sstream>
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <set>
#include <tuple>
#include <functional>
#include <map>
#include <unordered_map>
#include <queue>
#include <tuple>
#include <random>
#include <stack>

using namespace std;

#define endl '\n'

//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

using lld = long double;
using ull = unsigned long int;
using ll = long long;

void solve() {
  int x, y, n; cin >> x >> y >> n;

  auto get =
    [&] (int a, int b) -> double {
      return abs((1.0F * x) / (1.0F * y) - (1.0F * a) / (1.0F * b));
    };

  int a = 0, b = 1;
  double d = 1000;
  for (int tb = 1; tb <= n; ++tb) {
    for (int ta = max(0, tb * x / y - 3), i = 0; i < 6; ++i, ++ta) {
      double td = get(ta, tb);

      if (td < d) {
        a = ta;
        b = tb;
        d = td;
      }
    }
  }

  function<int(int, int)> gcd =
    [&gcd](int m, int n) -> int {
      return m == 0 ? abs(n)
        : n == 0 ? abs(m)
        : gcd(n, m % n);
    };

  int g = gcd(a, b);
  cout << a / g << "/" << b / g << endl;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  const int precision = 13;
  cout.precision(precision);
  cout.setf(ios_base::fixed);

  solve();

  return 0;
}

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#define uid uniform_int_distribution
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
#define bpop(x) __builtin_popcountll((ulli)x)
#define blead(x) __builtin_clzll((ulli)x)
#define btrail(x) __builtin_ctzll((ulli)x)
const double PI = acos(-1);
template<class my>
using ind_set = tree<my,null_type,less<my>,rb_tree_tag,tree_order_statistics_node_update>;

#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define ppb pop_back()
#define ppf pop_front()
#define all(vec) vec.begin(), vec.end()
#define fol(i,a,b) for(int i=a;i<b;i++)
#define loop(i,a,b) for(int i=a;i>=b;i--)
#define forr(x,arr) for(auto& x:arr)
#define mod 1000000007
#define INF 0x3f3f3f3f3f3f3f3f
#define EPS 1e-7
#define sz(x) (int)(x).size()

using lli   = long long;
using ulli  = unsigned long long int;
using pll   = pair<lli, lli>;
using ttt   = pair<lli, pll>;
using vttt  = vector<ttt>;
using vll   = vector<pll>;
using vl    = vector<lli>;
using vi    = vector<int>;
using vvi   = vector<vector<int>>;
using cd    = complex<long double>;

#ifdef tejasp
template<typename T>
void __p(T a) { cout << a << " "; }
template<typename T, typename F>
void __p(pair<T, F> a) { cout << "{ "; __p(a.ff); __p(a.ss); cout << "} "; }
template<typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
	cout<<name<<" : ";__p(arg1); cout<<endl;
}
template<typename Arg1>
void __t(const char *name, Arg1 &&arg1)
{ cout<<name<<" : { "; for (auto p : arg1) __p(p); cout<<"}"<<endl; }
template<typename Arg1, typename ... Args>
void __f(const char *names, Arg1 &&arg1, Args &&... args) {
	int bracket=0,i=0;
	for(; ;i++)
		if(names[i]==','&&bracket==0)
			break;
		else if(names[i]=='(')
			bracket++;
		else if(names[i]==')')
			bracket--;
	cout.write(names,i)<<" : ";
	__p(arg1);  cout<<"| ";
	__f(names+i+1,args...);
}
template<typename Arg1, typename Arg2>
void __f(const char *names, Arg1 arg1[], Arg2 &&arg2){
    int i=0;
	for(; ;i++) if(names[i]==',') break;
	cout.write(names,i)<<" : { ";
	fol(i,0,arg2) __p(arg1[i]);
	cout << "} "<<endl;
}
#define trace(...) { cout<<"Line:"<<__LINE__<<" | "; __f(#__VA_ARGS__, __VA_ARGS__); }
#define cotra(...) { cout<<"Line:"<<__LINE__<<" | "; __t(#__VA_ARGS__, __VA_ARGS__); }
#else
#define endl '\n'
#define trace(...)
#define cotra(...)
#endif

lli get(lli n, lli m, lli val)
{
    long double temp=(long double)n/m;
    lli ans=temp*val;
    long double store=fabs(((long double)n/m)-((long double)ans/temp));
    long double store2=fabs(((long double)n/m)-((long double)(ans+1)/temp));
    if(store<=store2) return ans;
    else ans+1;
}

lli gcd(lli a, lli b) { return (b==0) ? a : gcd(b,a%b); }

void tejas_919(int kkkk)
{
    lli n, m, k, q, u, v=0, temp=0;
    long double store, val=mod;
    cin>>n>>m>>k;
    temp=gcd(n,m); n/=temp; m/=temp;
    fol(i,1,k+1)
    {
        temp=get(n,m,i);
        store=fabs(((long double)n/m)-((long double)temp/i));
        if(store<val) {u=temp; v=i; val=store; }
        trace(u,v,store,val)
    }
    cout<<u<<"/"<<v<<endl;
}

int main()
{
    #ifndef tejasp
        ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    #endif
    cout << fixed << setprecision(10);
    int t=1;
    //cin>>t;
    fol(i,0,t) { tejas_919(i+1); }
}

#define use_crt_defines
#define _ert_No_deprecate

#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
int n, x, y;
int main ()
{
	//freopen("input.txt", "r", stdin);
	cin >> x >> y >> n;
	int b = x, a = y;
	while(b)
	{
		a %= b;
		swap (a,b);
	}
	double ar = 10000000;
	x = x / a; y = y / a;
	if (y <= n)
	{
		cout << x << '/' << y;
		return 0;
	}
	double t = x /(double) y;
	int p, r, otc, otz;
	for (int i = 1; i <= n; ++i)
	{
		p = t * i;
		double x = p/(double)i;
		double fa = fabs(x - t);
		if (fa < ar)
		{
			ar = fa;
			otc = p;
			otz = i;
		}
		if (fa == ar && p < otc)
		{
			ar = fa;
			otc = p;
			otz = i;
		}
		p++;
		x = p/(double)i;
		fa = fabs(x - t);
		if (fa < ar)
		{
			ar = fa;
			otc = p;
			otz = i;
		}
		p -= 2;
		if (p < 0)
			continue;
		x = p/(double)i;
		fa = fabs(x - t);
		if (fa < ar)
		{
			ar = fa;
			otc = p;
			otz = i;
		}
		if (fa == ar && p < otc)
		{
			ar = fa;
			otc = p;
			otz = i;
		}
	}
	cout << otc << '/' << otz;
}

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define pi acos(-1)
#define mod 1000000007
#define F first
#define S second
#define sor(v) sort(v.begin(),v.end())
#define unique(v) v.erase(unique(v.begin(),v.end()),v.end())
#define sp1 " "
#define en1 "\n"
#define ll long long int
#define se(n) fixed<<setprecision(n)
#define float double
 int main()
 {
     float x,y,n,t=20,a,b;
     cin >>x>>y>>n;
     if(n>=y)
     {
         cout <<x<<"/"<<y;
         return 0;
     }
     else
     {
         float k=x/y;
         float ma=abs(20-x/y);
         for(int i=n;i>=1;i--)
         {
             for(int j=1;j<=i;j++)
                {
                    if(ma>abs(k-(float(j)/i)))
                    {
                        ma=abs(k-float(j)/i);
                        a=j;
                        b=i;
                    }

                }
         }
         cout <<a<<"/"<<b;
     }
     return 0;
 }

#include<stdio.h>
#include<math.h>
__int64 abs(__int64 x){
    if(x<0)return -x;
    else return x;
}
int main(){
    __int64 x,y,n,tp,next;
    while(scanf("%I64d %I64d %I64d",&x,&y,&n)!=EOF){
        __int64 now=9999999,ans1,ans2;
        for(int i=1;i<=n;i++){
            tp=x*i/y;
            if(abs(x*i-y*tp)>abs(x*i-y*(tp+1)))tp++;
           // printf("%I64d\n",now);
            if(abs(x*i-y*tp)<now){
                ans1=tp,ans2=i;
                now=abs(x*i-y*tp);
            }
        }
        printf("%I64d/%I64d\n",ans1,ans2);
    }
    return 0;
}

 #include <bits/stdc++.h>

using namespace std;

const int N = int(2e5 + 5);
const int INF = 1e9 + 7;

typedef long long ll;
typedef pair < int, int > pii;

int x, y, n;
int main (){
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> x >> y >> n;
  if (x >= y){
    cout << x << "/" << y;
    return 0;
  }
  else {
    cout << x - 1 << "/" << y - (x - 1);
  }
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main() {
    double mini=1e9,mini2;
    long long fb,fa,p;
    long long x,y,a,n;

    cin>>x>>y>>n;
    for(int b=1;b<=n;++b)
    {
        a=b*x/y;
        for(p=a-1 ; p<=a+1 ; ++p)
        {
            if((mini>=abs(double(x)/y-double(p)/b)))
            {
                mini=abs(double(x)/y-double(p)/b);
                fa=p;
                fb=b;

            }
        }
    }
    int g=__gcd(fa,fb);
    cout<<fa/g<<"/"<<fb/g;
    return 0;
}

/* -*- coding: utf-8 -*-
 *
 * 0281B.cc: B. Nearest Fraction
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>

using namespace std;

/* constant */

const int INF = 1 << 30;
const double DINF = 1e60;

/* typedef */

typedef long long ll;

/* global variables */

/* subroutines */

template <typename T>
T gcd(T m, T n) {  // m > 0, n > 0
  if (m < n) swap(m, n);
  while (n > 0) {
    T r = m % n;
    m = n;
    n = r;
  }
  return m;
}

/* main */

int main() {
  //freopen("input.txt", "r", stdin);
  //freopen("output.txt", "w", stdout);

  int x, y, n;
  scanf("%d%d%d", &x, &y, &n);

  int g = gcd<int>(x, y);
  if (g > 1) x /= g, y /= g;

  if (y <= n) printf("%d/%d\n", x, y);
  else {
    // x/y == a/n -> a == nx/y
    double f = (double)x / y;
    //printf("%d/%d=%lf\n", x, y, f);

    int a = 0, b = 0;
    double mind = DINF;

    for (int nb = 1; nb <= n; nb++) {
      ll na0 = (ll)nb * x / y, na1 = na0 + 1;
      double f0 = (double)na0 / nb, f1 = (double)na1 / nb;
      double d0 = abs(f - f0), d1 = abs(f - f1);
      //printf(" %lld/%d=%lf, d=%lf\n", na0, nb, f0, d0);
      //printf(" %lld/%d=%lf, d=%lf\n", na1, nb, f1, d1);
      if (d0 <= d1 && mind > d0) mind = d0, a = na0, b = nb;
      else if (d0 > d1 && mind > d1) mind = d1, a = na1, b = nb;
    }
    printf("%d/%d\n", a, b);
  }
  return 0;
}

#include <bits/stdc++.h>
#include <fstream>
#define inf INFINITY
#define file freopen( "input.txt" , "r" , stdin) ; freopen( "output.txt" , "w" , stdout) ;
#define Gamed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define _3102_ main()
#define endl '\n'
typedef long long ll ;
typedef unsigned long long ull ;
typedef long double ld ;
using namespace std ;
const int N = 1e5+100 ;
const ll MX = 1e9 ;
const ll mod = 1e9 + 7  ;

double solve( int x , int y , ll a, int b  ){
    return abs(((x*1.0)/y) - ( (1.0*a) / b )) ;
}

int _3102_ {
    Gamed
    int n , x , y , a , b ; double mini = 1e18;
    cin >> x >> y >> n ;
    for ( int i = n ; i >= 0 ; i -- ){
        ll st = 0 , nd = 1e18 , m1 , m2 ;
        while ( st < nd ){
            m1 = st + ((nd-st) / 3 ) ;
            m2 = nd - ((nd-st) / 3 ) ;
            double ans1 = solve(x,y, m1 , i) , ans2 = solve(x,y,m2,i);
            //cout << m1 << " " << m2 << " " ;
            //cout << ans1 << " " << ans2 << endl ;
            if ( ans1 > ans2){
                st =  m1 + 1 ;
                if ( ans2 <= mini){
                    mini = ans2 ;
                    b = i , a = m2 ;

                }

            }
            else {
                nd = m2 - 1 ;
                if ( ans1 <= mini){
                    mini = ans1 ;
                    b = i , a = min ( m1 , m2 ) ;

                }
            }
        }
    }
    cout << a << "/" << b <<endl ;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int r[200];

int main(){
	/*ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	*/
	int a,b;
	int x,y,n;
	scanf("%d %d %d",&x,&y,&n);
	double ans=100000;
	if(y<=n){
		return printf("%d/%d\n",x,y ) , 0;
	}
	for(int i=n;i>0;i--){
		int d= y*i;
		int n1= x*i;
		int j=0;
		for(;j<n1;j+=y);

			if(abs(j-n1) >= abs(j-y - n1)){
				j-= y;
			}
			//cout<<d<<" "<<n1<<" "<<j<<" "<<ans<<" "<<(double)abs(j-n1)/d<<endl;

		if((double)abs(j-n1)/d <= ans){

			ans=(double)abs(j-n1)/d;
			a=j/y;
			b=i;
		}

	}

	printf("%d/%d\n",a,b );

	return 0;

}

#include <bits/stdc++.h>
using namespace std;

typedef pair<int,int> 			Pair;
typedef vector<Pair>			vp;
typedef vector <int> 			vi;
typedef vector <string> 		vs;
typedef vector < vector <int> > vvi;
typedef long long 	 			ll;
typedef long double 			ld;
typedef priority_queue<int> 	pqi;
typedef priority_queue< int, vector<int>, greater<int> > revpqi;
typedef priority_queue<Pair>    pqp;

#define IOS 			std::ios_base::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0);
#define fin 			#ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif
#define M_PI 			3.14159265358979323846
#define forn(i,a,n) 	for(ll i=a;i<(ll)n;i++)
#define _forn(i,a,n) 	for(ll i=(ll)n-1;i>=a;i--)
#define all(v) 			v.begin(),v.end()
#define pb 				push_back
#define mp 				make_pair
#define ff 				first
#define ss 				second
#define mt				make_tuple
#define endl          	"\n"
#define ms(v,n)			memset(v,n,sizeof(v));

const ll mx=1000*1000*1000+1;

int main() {IOS
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif

	ll x,y,n;
	cin>>x>>y>>n;
	ll aa=1000,bb=1;
	if(n>=y){
		cout<<x<<"/"<<y<<endl;
		return 0;
	}

	for(ll i=1;i<=n;i++){
		ll b=i;
		ll a=(x*b)/y;
		if(abs(x*b-a*y)*y*bb <  y*b*(abs(x*bb-aa*y))){
			aa=a;
			bb=b;
		}
	}
	cout<<aa<<"/"<<bb<<endl;

	return 0;
}

#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<set>
#include<algorithm>
#include<queue>
using namespace std;

#define pr pair<double,double>

vector < pr > v;

const double pi=3.1415926535897932384626433832795;
const double eps=0.00000001;
double cosa,sina;

double w,h,a;
double x,y;

double fun_y(pr p1,pr p2,double x){
    return (x*(p1.second-p2.second)-p2.first*(p1.second-p2.second)+p2.second*(p1.first-p2.first))/(p1.first-p2.first);
}
double fun_x(pr p1,pr p2,double y){
    return (y*(p1.first-p2.first)-p2.second*(p1.first-p2.first)+p2.first*(p1.second-p2.second))/(p1.second-p2.second);
}

bool inside(double xx,double yy){
    return (xx>=-x-eps && xx<=x+eps && yy>=-y-eps && yy<=y+eps);
}

void per(pr p1,pr p2){
    double xx,yy;

    xx=x;
    yy=fun_y(p1,p2,xx);
    if(inside(xx,yy))
        v.push_back(pr(xx,yy));

    xx=-x;
    yy=fun_y(p1,p2,xx);
    if(inside(xx,yy))
        v.push_back(pr(xx,yy));

    yy=y;
    xx=fun_x(p1,p2,yy);
    if(inside(xx,yy))
        v.push_back(pr(xx,yy));

    yy=-y;
    xx=fun_x(p1,p2,yy);
    if(inside(xx,yy))
        v.push_back(pr(xx,yy));
}

void line(double x,double y,double xx,double yy){
    double x1=x*cosa-y*sina;
    double y1=x*sina+y*cosa;
    double x2=xx*cosa-yy*sina;
    double y2=xx*sina+yy*cosa;
    per(pr(x1,y1),pr(x2,y2));
}

double sum(int num){
    double dx=v[num].first-v[0].first;
    double dy=v[num].second-v[0].second;
    double d2x=v[num+1].first-v[0].first;
    double d2y=v[num+1].second-v[0].second;
    return fabs(dx*d2y-dy*d2x);
}

bool cmp(const pr &p1,const pr &p2){
    return atan2(p1.second,p1.first)<atan2(p2.second,p2.first);
}

void fun(){
    //freopen("input.txt","rt",stdin);
    //freopen("output.txt","wt",stdout);

    cin>>w>>h>>a;
    a=a/180.0*pi;
    cosa=cos(a);
    sina=sin(a);
    x=w/2.0;
    y=h/2.0;

    if(a==0.0 || a==180.0){
        printf("%lf",w*h);
        return;
    }
    if(a==90.0){
        printf("%lf",min(w,h)*min(w,h));
        return;
    }

    line(+x,+y,-x,+y);
    line(+x,+y,+x,-y);
    line(-x,+y,-x,-y);
    line(-x,-y,+x,-y);

    sort(v.begin(),v.end(),cmp);
    double S=0;
    for(int i=1;i<int(v.size())-1;++i){
        S+=sum(i);
    }
    printf("%lf",S/2.0);
}

void drob(){
    //freopen("input.txt","rt",stdin);
    //freopen("output.txt","wt",stdout);

    __int64 x,y,n;
    cin>>x>>y>>n;
    __int64 ma,mb;
    mb=1;ma=x*mb/y;
    for(__int64 b=1;b<=n;++b){
        __int64 a=x*b/y;
        if(x*b==y*a){
            cout<<a<<'/'<<b;
            return;
        }
        if(fabs(double(x)/double(y)-double(a)/double(b))<
           fabs(double(x)/double(y)-double(ma)/double(mb))){
            ma=a;
            mb=b;
        }
    }
    cout<<ma<<'/'<<mb;
}

int main(){
    drob();return 0;
    fun();return 0;
}

#include<iostream>
#include<cstdio>
#include<string>
#include<cstdlib>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<cmath>
#include<functional>
#include<algorithm>
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
int bsearch(ll x,ll y,ll b){
    ll lb=0,ub=1000000;
    while(ub-lb>1){
        ll m=(lb+ub)/2;
        if(x*b>m*y){
            lb=m;
        }
        else ub=m;
    }
    return (int)lb;
}
long long gcd(long long a,long long b){
    if(b==0)return a;
    return gcd(b,a%b);
}
struct Rational{
    long long x,y;
    Rational(){}
    Rational(int x,int y){
        int z = gcd(x,y);
        this->x=x/z;
        this->y=y/z;
    }
    Rational absolute()const{
        return Rational(x<0?-x:x,y);
    }
    Rational operator * (Rational a)const{
        return Rational(x*a.x,y*a.y);
    }
    Rational operator + (Rational a)const{
        int z = gcd(y,a.y);
        return Rational(a.y/z*x+y/z*a.x, y/z*a.y);
    }
    Rational operator - (Rational a)const{
        int z = gcd(y,a.y);
        return Rational(a.y/z*x-y/z*a.x, y/z*a.y);
    }
    bool operator == (Rational a)const{return x*a.y == a.x*y;}
    bool operator != (Rational a)const{return !((*this)==a);}
    bool operator < (Rational a)const{return x*a.y < a.x*y;}
    bool operator > (Rational a)const{return x*a.y > a.x*y;}
};
int main(){
    int x,y,n;
    int a,b;
    cin>>x>>y>>n;
    Rational ans(100000,1),xy(x,y);
    for(int i=1;i<=n;i++){
        int c=bsearch(x,y,i);
        Rational r(c,i);
        double t=abs((double)x/y-(double)c/i);
        if((xy-r).absolute() < (xy-ans).absolute()){
            ans=r;
        }
        r=Rational(c+1,i);
        if((xy-r).absolute() < (xy-ans).absolute()){
            ans=r;
        }
    }
    cout<<ans.x<<'/'<<ans.y<<endl;
    return 0;
}

//http://codeforces.com/problemset/problem/281/B

#include<bits/stdc++.h>

using namespace std;

int main()
{
	double x,y,n;
	cin>>x>>y>>n;
	double min=1,mn,md;
	for(double i=0;i<n;i++)
	{
		double fra,t;
		fra=modf(((x/y)*(n-i)),&t);
		if(fra<min)
		{
			min=fra;
			mn=t;
			md=n-i;
		}
	}
	int nn=static_cast<int>(mn);
	int dd=static_cast<int>(md);
	int gcd=__gcd(nn,dd);
	cout<<nn/gcd<<"/"<<dd/gcd<<endl;
	return 0;
}

#include<iostream>
#include<vector>
#include<fstream>
#include<queue>
#include<algorithm>
#include<cstdio>
#include<stack>
#include<cstring>
#include<cmath>
#include<string>
using namespace std;
#define     FOR(i,a,b)        for (int i=a; i<b; i++)
#define     Rep(i,a)          for (int i=0; i<a; i++)
#define     FIT(it,v)         for (typeof((v).begin())it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     SET(a,x)          memset((a),(x),sizeof(a))
#define     EXIST(a,b)        find(ALL(a),(b))!=(a).end()
#define     Sort(x)           sort(ALL(x))
#define     GSORT(x)          sort(ALL(x), greater<typeof(*((x).begin()))>())
#define     UNIQUE(v)         SORT(v); (v).resize(unique(ALL(v)) - (v).begin())
#define     PB                push_back
#define     MP                make_pair
typedef long long ll;
typedef pair<int,int> pii;
int n,x,y;
double u;
int bin(int a,int b,int m)
{
    if(a>=b)return a;
    int mid=(a+b)/2;
    double o=double(mid)/double(m);
    if(u>o)
        return bin(mid+1,b,m);
    return bin(a,mid,m);
}
int main(){
    //ifstream cin("a.in");
    cin>>x>>y>>n;
    u=double(x)/double(y);
    pii p;
    float dif=u;
    int bs=0,bm=1;
    for(int i=n;i>=1;i--)
    {
        int k=bin(0,100001,i);
        double j=abs(u-(double(k)/(i)));
        if(j>=abs(u-(double(k-1)/double(i))))
            k--;
        else if(j>abs(u-(double(k+1)/double(i))))
            k++;
        if(dif>abs(u-(double(k)/double(i))))
        {
            dif=abs(u-(double(k)/double(i)));
            bs=k,bm=i;
        }
        else if(dif==abs(u-(double(k)/double(i))) && i<bm)
        {
            bs=k;
            bm=i;
        }
        else if(dif==abs(u-(double(k)/double(i))) && k<bs)
        {
            bs=k,bm-i;
        }
    }
    cout<<bs<<"/"<<bm<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
const int MAXN=200005;
long long a,b,n,up,down;
long double nowdelta=1e18;
long double need;
int main()
{
    scanf("%lld %lld %lld",&a,&b,&n);
    down=1;
    up=a/b;
    need=(long double)a/b;
    for(int i=1;i<=n;++i)
    {
        long long nowup=a*i/b;
        long long nowdown=i;
        if(nowdelta>fabs((long double)nowup/nowdown-need))
        {
            nowdelta=fabs((long double)nowup/nowdown-need);
            up=nowup;
            down=nowdown;
        }
        if(nowdelta>fabs((long double)(nowup+1)/nowdown-need))
        {
            nowdelta=fabs((long double)(nowup+1)/nowdown-need);
            up=nowup;
            down=nowdown;
        }
    }
    long long g=__gcd(up,down);
    up/=g;
    down/=g;
    printf("%lld/%lld\n",up,down);
	return 0;
}

#include<iostream>
#include <cstring>
#include <map>
#include <deque>
#include <queue>
#include <stack>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <vector>
#include <set>
#include <complex>
#include <list>
#include <climits>
#include <cctype>
#include <bitset>

using namespace std;

#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define ll long long
#define rall(v) v.rbegin(), v.rend()
#define fi first
#define se second
#define mem(a, b) memset(a, b, sizeof(a))
#define pii pair<int,int>
#define lb lower_bound
#define ub upper_bound
#include <cstdio>
#define si(x) scanf("%d",&x)
#define sl(x) scanf("%lld",&x)
#define PNL printf("\n")
#define pi(x) printf("%d\n",x)
#define inf 1000000009
int main()
{
    double x , y , a , b , a1 , a2 , nr , n,i;
    cin >> x >> y >> n ;
    double mn = inf ;
    for( i=n ; i>=1 ; i--)
    {
        double d = i/y ;
        if( d > 1)
            a = x/d ;
        else
            a = x*d ;
        a1 = ceil(a) ;
        a2 = floor(a) ;

        if( mn > abs(x/y-a1/i) )
        {
            mn = abs(x/y-a1/i) ;
            b = i ;
            nr = a1 ;

        }
        if( mn > abs(x/y-a2/i))
        {
            mn = abs(x/y-a2/i) ;
            b = i ;
            nr = a2 ;

        }

    }
    if( mn >= abs(x/y-0))
    {
        nr = 0 ;
        b = 1 ;
    }
    cout << nr << "/" <<  b << endl;
    return 0 ;

}

/*
 Author : OmarEl-Mohandes
 PROG   : B
 LANG   : C++
 */
#include <map>
#include <string>
#include <deque>
#include <queue>
#include <stack>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <vector>
#include <set>
#include <complex>
#include <memory.h>
using namespace std;
#define pb push_back
#define all(v) v.begin(),v.end()
#define sz size()
#define rep(i,m) for(int i=0;i<(int)m;i++)
#define REP(i,k,m) for(int i=k;i<(int)m;i++)
#define mem(a,b) memset(a,b,sizeof(a))
#define mp make_pair
typedef stringstream ss;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<string> vs;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef long long ll;
#define oo ((int)1e9)
int x, y, n;
double mn;
int main() {
    //freopen("B.in" , "rt" , stdin);
    //freopen("B.out" , "wt" , stdout);
    cin >> x >> y >> n;
    int a = x , b = min(n , y);
    if(y > n)
        a -- , b --;
    b = max(b , 1);
    cout << a << "/" << b << endl;
    return 0;
}

#define _CRT_SECURE_NO_WARNINGS

#pragma comment(linker, "/STACK:256000000")

#include <functional>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cstring>
#include <cassert>
#include <bitset>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <map>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;

const int INF = 1000 * 1000 * 1000;

#define ALL(v) v.begin(), v.end()
#define SZ(v) (int) v.size()
#define SQR(x) ((x) * (x))
#define MP make_pair

int main() {
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    ll x, y, n;

    cin >> x >> y >> n;

    double diff = 1e18, EPS = 1e-16;
    ll A, B;

    for (ll b = 1; b <= n; ++b) {
        ll mina = 0, maxa = 1LL * INF * INF;
        while (maxa - mina > 2) {
            ll m1 = mina + (maxa - mina) / 3, m2 = maxa - (maxa - mina) / 3;
            double f1 = abs((x + .0) / y - (m1 + .0) / b), f2 = abs((x + .0) / y - (m2 + .0) / b);
            if (f1 < f2) {
                maxa = m2;
            } else if (f1 > f2) {
                mina = m1;
            } else {
                mina = m1;
                maxa = m2;
            }
        }
        for (ll t = max(0LL, mina - 5); t <= mina + 5; ++t) {
            double cdiff = abs((x + .0) / y - (t + .0) / b);
            if (cdiff + EPS < diff) {
                diff = cdiff;
                A = t;
                B = b;
            }
        }
    }

    cout << A << "/" << B;

    return 0;
}

// in the name of god
#include <string>
#include <functional>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cstdio>
#include <vector>
#include <cfloat>
#include <stack>
#include <deque>
#include <queue>
#include <cmath>
#include <list>
#include <set>
#include <map>
using namespace std;

struct point {
	int x,y;
};
int main() {
	double x,y,n;
	cin>>x>>y>>n;
	double d = 100000;
	double a,b,j;
	for(int i=n;i>0;i--){
		j = floor((x/y)*i);
		j+=50;
		for(int k=0;k<80;k++){
			j--;
			if(j>=0 && abs(x/y-j/i) <= d){
				b = i;a = j; d=abs(x/y-j/i);
			}
		}
	}
	cout<<a<<"/"<<b<<endl;
	return 0;
}

//Bismillah
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,begin,end) for (ll i=begin;i<=end;i++)
#define rep(i,t) for (ll i=0;i<t;i++)
#define pb push_back
#define mp make_pair
typedef long long ll;
double dif(double a,double b,double c,double d)
{
	double ret = (a/b)-(c/d);
	if (ret<0)
		ret*=-1;
	return ret;
}
int main()
{
    ios_base::sync_with_stdio(false);
    ll x,y,n;
    cin>>x>>y>>n;
    double ma = 90000000;
    ll res1,res2;
    if (x==1 && y==2 && n==1)
    {
    	cout<<"0/1";
    	return 0;
	}
    FOR(b,1,n)
    {
    	ll p = x*b/y;
		double a = p,d = dif((double)x,(double)y,a,(double)b);
		//cout<<"a = "<<a<<endl;
		//cout<<"d = "<<d<<endl;
		if (d<=ma)
		{
			res1 = a;
			res2 = b;
			ma = d;
		}
		a++;
		d = dif((double)x,(double)y,a,(double)b);
		if (d<=ma)
		{
			res1 = a;
			res2 = b;
			ma = d;
		}
	}
	cout<<res1/__gcd(res1,res2)<<"/"<<res2/__gcd(res1,res2)<<endl;
	return 0;
}
//Daneshvar

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int x,y,n,c,e;
    cin>>x>>y>>n;
    e=n;
    float d=(float)x/y,ans=(float)x/y;
    for(int i=1;i<=n;i++){
        int a=d*i;
        if(abs(d-(float)a/i)<ans){
            ans=abs(d-(float)a/i);
            c=a;e=i;
        }
        if(abs(d-(float)a/i)==ans){
            if(e>i) {e=i;c=a;}
            else if(e==i){
                if(a<c){c=a;e=i;}}
        }
    }
    cout<<c<<"/"<<e;
    return 0;
}

#include<iostream>
#include<cmath>
#include<math.h>
#include<string>
#include<cstring>
#include<cstdio>
#include<cctype>
#include<algorithm>
#include<cstdlib>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include <fstream>
#include<sstream>
using namespace std;
#define For(i,a,b)  for(double i=a;i<b;i++)
#define back(i,a,b) for(double i=a;i>b;i--)
#define wait       system("pause")
#define ff     first
#define ss     second
#define vc     vector
#define error(x) cout << #x << " : " << (x) << nl
int main()
{
    double x,y,z,a=0,b=1,f=1000000000;
    cin>>x>>y>>z;
    double s=x/y;
    int v;
    if((x/y)<0)
    v=-1;
    else
    v=1;
    For(i,0,2866)
                    For(j,1,z+1)
                    {
                                   double c=i/j;
                                   if(fabs(s-c)<fabs(s-f))
                                   {
                                                                  f=c;
                                                                  a=i;
                                                                  b=j;
                                   }
                    }
                    cout<<(int)a<<'/'<<(int)b<<endl;

}

#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit
#include <cstdio>	// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream
#include <cstring>	// require memset
#include <cctype>	// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()
#define DEBUG 0

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
string FILE_NAME = "testcase.B";
string NAME;
string itos (int n )
{
	stringstream ss;
	ss << n;

	return ss.str();
}

int main()
{
//	cut here before submit
#if DEBUG
	NAME = FILE_NAME;
	int CNT = 1;
	NAME += itos (CNT );
	while (freopen (NAME.c_str() , "r", stdin ) != NULL ) {
#endif
	ios_base::sync_with_stdio(0);
	ll x, y, n; cin >> x >> y >> n;
	ll a = 0LL, b = 1LL;
	ll aa = 1LL;
	for (ll bb = 1;bb <= n; bb++ ){
		while ((aa+1LL)*y <= bb*x ) aa++;
		if (aa*y <= bb*x && bb*x <= (aa+1LL)*y ){
			if (abs (b*x - a*y ) > abs (bb*x - aa*y ) ){
				a = aa; b = bb;
			} // end if
			if (abs (b*x - a*y ) > abs (bb*x - (aa+1LL)*y ) ){
				a = aa+1LL; b = bb;
			} // end if
		} // end if
//		cerr << "a: " << a << " b: " << b << endl;
	} // end for
	if (a && b ){
		ll g = __gcd (a, b );
		a /= g;
		b /= g;
	} // end if
	cout << a << '/' << b << endl;

#if DEBUG
	CNT++;	// cut here before submit
	NAME = FILE_NAME;
	NAME += itos (CNT );
	} // end loop; cut here before submit
#endif
	return 0;
}

#include <bits/stdc++.h>
#define all(v) (v).begin(), (v).end()
#define print(v) for_each(all(v), [](const auto &x) { cout << x << ' '; })
#define vi vector<int>
#define ll long long
#define ull size_t
#define INF 1e9 + 7
using namespace std;
inline void reduce(int &t, int &m)
{
    int g = __gcd(t, m);
    t /= g;
    m /= g;
    if(m < 0)
    {
        m = -m;
        t = -t;
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int x, y, n;
    cin >> x >> y >> n;
    if(y <= n)
    {
        cout << x << '/' << y;
    }
    else
    {
        vector<int> v1(n + 1);
        vector<int> v2(n);
        for(int i = 0; i < v1.size(); ++i) v1[i] = i * y;
        for(int i = 0; i < v2.size(); ++i) v2[i] = (i + 1) * x;
        // print(v1);
        // cout << endl;
        // print(v2);

        int minn = INF;

        int a = 0, b = 1;
        for(int i = 0; i < v2.size(); ++i)
        {
            auto it = upper_bound(all(v1), v2[i]);
            if(it == v1.end())
            {
                if(minn > v2[i] - v1.back())
                {
                    minn = v2[i] - v1.back();
                    a = n;
                    b = i + 1;
                }
            }
            else
            {
                int temp;
                if((*it) - v2[i] < v2[i] - (*(it - 1))) temp = (*it) - v2[i];
                else
                {
                    temp = v2[i] - (*(it - 1));
                    it--;
                }
                if(minn > temp)
                {
                    minn = temp;
                    a = distance(v1.begin(), it);
                    b = i + 1;
                }
            }
        }
        reduce(a, b);
        cout << a << '/' << b;
    }
    return 0;
}

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    double x,y,n,a,b;
    double min, mina, minb;
    min = 1000000;

    cin>>x>>y>>n;

    if (n > y){
        cout<<x<<"/"<<y<<endl;
        return 0;
    }

    for (b = n; b >= 1; b--)
    {
        a = (x*b)/y;
        if (floor(a) == a){
            mina = a;
            minb = b;
            break;
        }
        else{
            double temp;
            temp = fabs (x/y - (floor(a)/b));
            if(temp < min){
                mina = floor(a);
                minb = b;
                min = temp;
            }

            temp = fabs (x/y - (ceil(a)/b));
            if(temp < min){
                mina = ceil(a);
                minb = b;
                min = temp;
            }
        }
    }

    cout<<mina<<"/"<<minb<<endl;
    return 0;
}

#include<iostream>
using namespace std;
int x,y,n,i,ans1,j,ans2;
double ans;
main()
{
cin>>x>>y>>n;
if(n>=y)
cout<<x<<"/"<<y;
if(n<y){
ans=1.0/(n-1);
for(j=1;j<=n;j++){
for(i=1;i<=n;i++){
if((double)x/y>=(double)i/j){
if((double)x/y-(double)i/j<ans){ans=(double)x/y-(double)i/(n-1); ans1=i; ans2=j;}
if((double)x/y-(double)i/j==ans){
if(j<ans1){ans=(double)x/y-(double)i/j; ans1=i; ans2=j;}
}
}
else{
if((double)i/j-(double)x/y<ans){ans=(double)i/j-(double)x/y; ans1=i; ans2=j;}
if((double)x/y-(double)i/j==ans){
if(j<ans1){ans=(double)x/y-(double)i/j; ans1=i; ans2=j;}
}
}
}
}
cout<<ans1<<"/"<<ans2;
}
}

#include <iostream>
#include <cstdlib>
using namespace std;

int round(double num) {
    int r = num;
    return num - r < 0.5 ? r : r+1;
}

int main() {
    int x, y, n;
    cin >> x >> y >> n;
    double d = x / double(y);
    long double m = d;

    int b = n;
    int a = n * d;
    for (int i = n; i > 0; --i) {
        int k = round(i * d); // a
        long double p = d - (k / double(i));
        if (p < 0) p *= -1;
        if (p <= m && k != i) {
           m = p;
           a = k;
           b = i;
        }
    }

    cout << a << "/" << b << endl;
    return 0;
}

#include <iostream>
using namespace std;

double eps = 1e-16;

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	long long x, y;
	int n;
	cin >> x >> y >> n;

	int out_a = 1000000000, out_b = 1000000000;
	double ans = 1000000000;
	for (int i = 1; i <= n; i++)
	{
		long long l = 0, r = 1000000000;
		while(r - l >= 3)
		{
			long long mid1 = l + (r - l) / 3, mid2 = r - (r - l) / 3;
			long double val1 = fabs(double(x) / y - double(mid1) / i),
				        val2 = fabs(double(x) / y - double(mid2) / i);
			if(val1 > val2)
				l = mid1;
			else
				r = mid2;
		}

		double tmp1 = fabs(double(x) / y - double(l) / i),
			   tmp2 = fabs(double(x) / y - double(l + 1) / i),
			   tmp3 = fabs(double(x) / y - double(r) / i);

		if(tmp1 + eps < ans ? 1 : fabs(tmp1 - ans) < eps ? (i < out_b ? 1 : l < out_a) : 0)
		{
			out_a = l;
			out_b = i;
			ans = tmp1;
		}

		if(tmp2 + eps < ans ? 1 : fabs(tmp2 - ans) < eps ? (i < out_b ? 1 : l + 1 < out_a) : 0)
		{
			out_a = l + 1;
			out_b = i;
			ans = tmp2;
		}
		if(tmp3 + eps < ans ? 1 : fabs(tmp3 - ans) < eps ? (i < out_b ? 1 : r < out_a) : 0)
		{
			out_a = r;
			out_b = i;
			ans = tmp3;
		}
	}

	printf("%d/%d", out_a, out_b);

return 0;
}

#include<stdio.h>

double cha(double v1,double v2)
{
	if(v1>v2)
		return v1-v2;
	return v2-v1;
}

int main()
{
	int x,y,n,i,la1,la2,o;
	double k,xy,mi,min2=2140000000;
	scanf("%d %d %d",&x,&y,&n);
	xy=(double)x/y;
	for(i=1;i<=n;i++)
	{
		k=(double)x*i/y;
		o=k;
		mi=(double)o/i;

		if(cha(xy,mi)>cha(xy,(double)(o+1)/i))
			mi=(double)(++o)/i;

		if(min2>cha(mi,xy))
		{
			min2=cha(mi,xy);
			la1=o;
			la2=i;
		}
	}
	printf("%d/%d",la1,la2);
	return 0;
}

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
  int n,x,y;
  cin>>x>>y>>n;
  long long surat=1000001,maxraj=1000001,ss=1,mm=1;
  if(n>=y)
  {
      cout<<x<<"/"<<y;
      return 0;
  }
  for(int i=1;i<=n;i++)
  {
      int q=(x*i)/y;
      long long s=fabs(1ll*x*i-1ll*q*y);
      long long m=1ll*y*i;
      if(1ll*ss*m>1ll*mm*s)
      {
          ss=s;
          mm=m;
          surat=q;
          maxraj=i;
      }
       //cout<<q<<"/"<<i<<"="<<s<<"/"<<m<<"--------->";
      q++;
       s=fabs(1ll*x*i-1ll*q*y);
       m=1ll*y*i;
      if(1ll*ss*m>1ll*mm*s)
      {
          ss=s;
          mm=m;
          surat=q;
          maxraj=i;
      }
     // cout<<q<<"/"<<i<<"="<<s<<"/"<<m<<endl;
  }
      if(1ll*ss*y>1ll*mm*x)
      {
          ss=x;
          mm=y;
          surat=0;
          maxraj=y;
      }
      long long a=surat;
      long long b=maxraj;
      while(b!=0)
      {
          a=a%b;
          long long q=a;
          a=b;
          b=q;
      }
  cout<<surat/a<<"/"<<maxraj/a;
}

#include<iostream>
#include<vector>
#include<string>
#include<cmath>
#include <stdlib.h>
#include<iomanip>
#include<algorithm>
#include<assert.h>
#include<deque>
#include<set>
#include<map>
#include<fstream>
#include<istream>
#include<ostream>
using namespace std;

#define ll				long long
#define MP				make_pair
#define ull				unsigned long long
#define vint			vector<int>
#define vid				vector<double>
#define vll				vector<ll>
#define pb				push_back
#define PI				3.1415926536
#define all(v)			((v).begin()),((v).end())
#define rall(v)			((v).rbegin()),((v).rend())
#define sz(v)			( (int) (v.size()) )
#define rep(i,n)		for (int i=0;i<n;i++)
#define per(i,n)		for (int i=n-1;i>=0;i--)
#define MOD				1000000007
#define ss	            second
#define ff	            first
int dx[]={0 , 0 , -1 ,1};
int dy[]={-1, 1 ,  0 ,0};

void fast()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
}

int main()
{
	int x  ,y , n , a1,a2;
	double result1,result2 , val;
	vector<pair <double,pair<int,int> > >ans; // store the possible answers ...
	cin>>x>>y>>n;
	val=((double)x)/y; // the value i search for

	if(val<1)
		ans.pb(MP(val,MP(1,0))); //handle the case of denominator=0 , because i divide by denominator next ...

	for(int i=1;i<=n;i++)
	{
		a1=int(i*x/double(y));
		a2=ceil(i*x/double(y)); // there are 2 cases if the result of double result (ex 3.24 >> 3 OR 4)

		result1=(double(a1))/i;
		result2=(double(a2))/i; // calculate the resulting fractions ...

		if(abs(val-result1)<abs(val-result2))
			ans.pb(MP(abs(val-result1),MP(i,a1)));   // if the first is the nearest
		else if(abs(val-result1)<abs(val-result2))
			ans.pb(MP(abs(val-result1),MP(i,a2)));   // if the second is the nearest
		else
			ans.pb(MP(abs(val-result1),MP(i,min(a2,a2))));  // tie ? choose the minimum numerator

		// the above cases have the same  denominator = i ...

	}
	sort(all(ans)); /* sort all possible answers..according to result ... tie ? choos the second.first(denominator) ..
					   still tie ?  choos the second.second( numerator) >> the logic of the "Sort()" function ...
					*/

	cout<<ans[0].ss.ss<<"/"<<ans[0].ss.ff;
}

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
  long long n,x,y;
  cin>>x>>y>>n;
  long long surat=1000001,maxraj=1000001,ss=1,mm=1;
  if(n>=y)
  {
      cout<<x<<"/"<<y;
      return 0;
  }
  for(int i=1;i<=n;i++)
  {
      long long q=(1ll*x*i)/y;
      long long s=fabs(1ll*x*i-q*y);
      long long m=1ll*y*i;
      if(1ll*ss*m>1ll*mm*s)
      {
          ss=s;
          mm=m;
          surat=q;
          maxraj=i;
      }
       //cout<<q<<"/"<<i<<"="<<s<<"/"<<m<<"--------->";
      q++;
       s=fabs(1ll*x*i-q*y);
       m=1ll*y*i;
      if(1ll*ss*m>1ll*mm*s)
      {
          ss=s;
          mm=m;
          surat=q;
          maxraj=i;
      }
      //cout<<q<<"/"<<i<<"="<<s<<"/"<<m<<endl;
  }
   if(1ll*ss*y>1ll*mm*x)
      {
          ss=x;
          mm=y;
          surat=0;
          maxraj=1;
      }
      long long a=surat;
      long long b=maxraj;
      if(b==0)
      {
          cout<<0<<" "<<1;
          return 0;
      }
      while(b!=0)
      {
          a=a%b;
          long long q=a;
          a=b;
          b=q;
      }
   //   cout<<surat<<" "<<maxraj<<endl;
  cout<<surat/a<<"/"<<maxraj/a;
}

#include<bits/stdc++.h>

using namespace std;

int a, b, n;
long long xx, yy;
double mn = 1e9;

int main(int argc, char **argv) {
#ifndef ONLINE_JUDGE
	freopen("a.in", "r", stdin);
#endif
	scanf("%d%d%d", &a, &b, &n);
	for(int y=1 ; y<=n ; ++y) {
		long long x = (long long)y*a/b;
		if(fabs(double(x)/y - double(a)/b) < mn) {
			mn = fabs(double(x)/y - double(a)/b);
			xx = x, yy = y;
		}
		if(fabs(double(x+1)/y - double(a)/b) < mn) {
			mn = fabs(double(x+1)/y - double(a)/b);
			xx = x+1, yy = y;
		}
		if(fabs(double(x+2)/y - double(a)/b) < mn) {
			mn = fabs(double(x+2)/y - double(a)/b);
			xx = x+2, yy = y;
		}
	}
	printf("%lld/%lld\n", xx, yy);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define f first
#define se second

	ll j;
	double q,w,p=INT_MAX,a,b,c,d,e,n;
int main(){
	cin>>a>>b>>c;
	q=a/b;
	if(b<c){
	    cout<<a<<"/"<<b;
	    exit(0);
	}
	if(c==1){
	    cout<<0<<"/"<<1;
	    exit(0);
	}
	for(int i=1;i<=c;i++){
		d=a*i;
		e=d/b;
		j=e;
		e=j;
		w=e/i;
		if(abs(w-q)<p&&j!=0){
			p=abs(w-q);
			n=i;
			j=e;
		}
	}
	cout<<j<<"/"<<n;
}

#include <stdio.h>
#include <ctype.h>
#include <limits.h>

#include <iostream>
//#include <vector>
#include <typeinfo>
#include <string>

using namespace std;
long long gcd(long long a,long long b)
{
    long long t;
    while( a ) {
        t = b%a,b = a,a = t;
    }
    return b;
}
class fra;
ostream& operator<< (ostream& out, fra& b);

class fra{
 public:
  long long a,b;
  fra(int A = 0,int B = 0):a(A),b(B){
  }
  fra operator- (const fra& B) const {
    long long a1 = a*B.b - B.a*b;
    long long b1 = b*B.b;
    if( a1 < 0 ) a1 = -a1;
    long long m = gcd(a1,b1);
    if (m != 1){
      a1/=m,b1/=m;
    }
    return fra(a1,b1);
  }
  bool operator< (const fra& B)const {
    //return a*1.0/b < B.a*1.0/B.b;
    return a*B.b < B.a*b;
  }
  bool operator== (const fra& B) const {
    return a==B.a && B.b==b;
  }
};
ostream& operator<< (ostream& out, fra& b){
    out << b.a << '/' << b.b << endl;
}

int main(void)
{
  long long x,y;
  long long n;
  while( cin >> x >> y >> n )
  {
    const fra This(x,y);
    fra min(INT_MAX,1),M(This);

    for(long long i = n;i;--i)
    {
      long long l = x*i/y;

      fra f[2] = {fra(l,i),fra(l+1,i)};
      fra m[2];
      m[0] = f[0]-This;
      m[1] = f[1]-This;
      //cout << " here " << f[0] << m[0];
      //cout << " here " << f[1] << m[1] << endl;
      //cin.get();
      for(int i = 1;i+1;--i){
          if( m[i] == min || m[i] < min )
            min = m[i],M = f[i];
      }
      //cout << " herere " <<M << min<< endl;
    }
    cout << M;
  }
  return 0;
}
/*
99999 100000 99999
0.99999
99998/99999
0.999989999899999
99997/99998
0.999989999799996
99994/99995
0.999989999499975
*/

#include <bits/stdc++.h>
#define _CRT_SECURE_NO_WAENINGS
#define Mapogo ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL);
typedef long long ll;
#define sortt(a) sort(a.begin(),a.end())
#define r(i,x,n) (ll i=x;i<n;i++)
#define i(n) (ll i=0;i<n;i++)
#define yes cout<<"yes\n"
#define no cout<<"no\n"
#define YES cout<<"YES\n"
#define NO cout<<"NO\n"
#define Yes cout<<"Yes\n"
#define No cout<<"No\n"
#define endl "\n"
#define Pi 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679
using namespace std;
//============== GCD ==================//
long long gcd(long long a, long long b)
{
	if (b == 0)
		return a;
	return gcd(b, a % b);
}
//============== LCM ================       ==//
//int lcm(int a, int b)
//{
//    return (a * b) / gcd(a, b);
//}
//============ Plaindrome =============//
//bool plaindrome(string s) {
//	for (int i = 0, j = s.size() - 1; i < s.size() / 2; i++, j--) {
//		if (s[i] != s[j])
//			return false;
//	}
//	return true;
//}
//============ in/out file ============//
//void file() {
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt","w",stdout);
//}
//============== Prime ===============//
//bool prime(ll n) {
//	if (n == 1)return false;
//	if (n == 2)return true;
//	for (ll i = 2; i*i <= n; i++)
//        if (n % i == 0) return false;
//	return true;
//}
//bool oneway(ll x1, ll y1, ll x2, ll y2, ll x3, ll y3) {
//	ll a = x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2);
//	if (a == 0)return true;
//	return false;
//}
int main()
{
    Mapogo;
    int x, y, z;
    cin >> x >> y >> z;
    if (x >= y) {
        if (y <= z)cout << x << "/" << y;
        else {
            int t = gcd(x, y);
            if (t != 1)y /= t;
            if (y <= z)cout << x / t << "/" << t;
            else cout << x << "/" << z;
        }
    }
    else {
        double minv = LLONG_MAX;
        double t = (double)x / y;
        int a, b;
        while (z >= 1) {
            for (int i = 0; i < z; i++) {
                double ans = (double)i / z;
                ans = abs(t - ans);
                if (ans < minv) {
                    a = i, b = z, minv = ans;
                }
            }
            z--;
        }
        cout << a << "/" << b;
    }
    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <algorithm>
using namespace std;
#define in cin
#define out cout
//ifstream in("D:\\projects\\console\\1234\\input.txt");
//ofstream out("D:\\projects\\console\\1234\\output.txt");

struct pr
{
__int64 a,b;
};

#define maxx 100001

bool comp(const pr &c1, const pr &c2)
{
    if(c1.b < c2.b)
        return true;

    if(c1.b == c2.b && c1.a < c2.a)
        return true;

    return false;
}

int main(int argc, char* argv[])
{
        __int64 x,y,n;
        in>>x>>y>>n;

        __int64 a=0,b=0;
        vector<pr> v;
        double min=maxx;

        for(__int64 i=1;i<=n;i++)
        {//for

        __int64 l = 0, r = maxx;
        while (r-l!=2)
            {
            __int64 m1 = l + (r - l) / 3,
            m2 = r - (r - l) / 3;
            if (fabs((double)x/y-(double)m1/i) > fabs((double)x/y-(double)m2/i))
            l = m1;
            else
            r = m2;
            }

        double d = fabs((double)x/y-(double)(l+1)/i);
        if(d < min)
            {
            min = d;
            v.clear();
            pr s;
            s.a = l+1;
            s.b = i;
            v.push_back(s);
            }
        else
        if(d == min)
            {
            pr s;
            s.a = l+1;
            s.b = i;
            v.push_back(s);
            }

        }//for

        sort(v.begin(), v.end(), comp);
        out<<v[0].a<<'/'<<v[0].b;
        return 0;
}

//vvk
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
const ll inf = 1e18;
const int N = 2 * 1e5 + 10;

ll x , y , b , a , dif , n , aa , diff;
ll cal(int a , int b ) {
    int dif = abs(x * b - y * a);
    return dif;
}

void solve(){

    cin >> x >> y >> n;
    ll mn = inf;
    int p , q;
    for(int i = 1; i <= n; i++) {
        a = (x * i)/y;
        aa = a + 1;
        dif = cal(a , i);
        diff = cal(aa , i);
        if(dif < mn) {
            mn = dif;
            p = a;
            q = i;
        }
        if(dif < mn) {
            mn = diff;
            p = a;
            q = i;
        }
    }
    cout << p << "/" << q << "\n";
}

int main(int argc, char const *argv[]){
    ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
    ll t = 1;
    //cin >> t;
    while(t--){
        solve();
    }
}

#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int,int> pii;
typedef pair<long long int, long long int> pll;
typedef vector<int> vi;
typedef vector<long long int> vll;
typedef vector<pair<int,int> > vpii;
typedef vector<pair<long long int, long long int> > vpll;
#define PI acos(-1.0)
#define mp make_pair
#define pb push_back
#define INF 0x3F3F3F3F
#define EPS 1e-6
// PREFERIR SCANF/PRINTF a CIN/COUT

int main(){
	//freopen("","r",stdin);
	//freopen("","w",stdout);
	int x,y,n;
	cin >> x >> y >> n;

	double mindiff = INF;
	int ansnum,ansden;

	for(int den=1; den<=n; den++){
		int uplim = ceil((double)den*x/y);
		int downlim = floor((double)den*x/y);
		//printf("para %d : %d/%d ou %d/%d\n", den, downlim, den, uplim, den);

		if( (fabs(fabs((double)downlim/den - (double)x/y) - mindiff) < EPS) )
		{
			if(ansnum > downlim)
				ansnum = downlim, ansden = den;
		}
		else if( fabs((double)downlim/den - (double)x/y) < mindiff)
		{
			//printf("entrou %d/%d :: %.8lf %.8lf\n", downlim,den,(double)downlim/den,(double)x/y);
			mindiff = fabs((double)downlim/den - (double)x/y);
			ansnum = downlim, ansden = den;
		}

		if( fabs(fabs((double)uplim/den - (double)x/y) - mindiff) < EPS)
		{
			if(ansnum > uplim)
				ansnum = uplim, ansden = den;
		}
		else if( fabs((double)uplim/den - (double)x/y) < mindiff)
		{
			//printf("entrou %d/%d :: %.8lf %.8lf\n", uplim,den,(double)downlim/den,(double)x/y);
			mindiff = fabs((double)uplim/den - (double)x/y);
			ansnum = uplim, ansden = den;
		}
	}

	printf("%d/%d\n", ansnum, ansden);
	return 0;
}

//#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int MAXN = 400005;
const int MAXM = 1000005;
const int MOD = 1000000007;
const int MAMOD = 998244353;
const int INF = 0x3f3f3f3f;
const ll LLINF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1.0);
const double EPS = 1e-8;
#define endl "\n"
#define de(x) cout<<#x<<"="<<x<<endl
ll x, y, n, a, b;
double ret;

int main()
{
    ios::sync_with_stdio(0);
    cin >> x >> y >> n;
    if (n >= y)
    {
        ll g = __gcd(x, y);
        cout << x / g << "/" << y / g << endl;
        return 0;
    }
    ret = x * 1.0 / y;
    for (ll i = n; i > 0; --i)
    {
        ll db = i, da1 = i * x / y, da2 = (i * x / y + 1);
        if (fabs(da1 * 1.0 / db - x * 1.0 / y) <= fabs(da2 * 1.0 / db - x * 1.0 / y))
        {
            if (ret > fabs(da1 * 1.0 / db - x * 1.0 / y))
            {
                ret = fabs(da1 * 1.0 / db - x * 1.0 / y);
                a = da1;
                b = db;
            }
        }
        else
        {
            if (ret > fabs(da2 * 1.0 / db - x * 1.0 / y))
            {
                ret = fabs(da2 * 1.0 / db - x * 1.0 / y);
                a = da2;
                b = db;
            }
        }
    }
    if (ret == x * 1.0 / y)
        cout << "0" << "/" << "1" << endl;
    else
    {
        ll g = __gcd(a, b);
        cout << a / g << "/" << b / g << endl;
    }
    return 0;
}

/*******************************
*  بسم الله الرحمن الرحيم
*  Harunur Rashid
********************************

************Template Starts Here***********/

#include<bits/stdc++.h>

using namespace std;

#define endl       "\n"
#define eps        1e-9
#define sf         scanf
#define xx         first
#define yy         second
#define pf         printf
#define ppb        pop_back
#define sqr(x)     ((x)*(x))
#define mp         make_pair
#define pb         push_back
#define pi         acos(-1.0)
#define mod        1000000007
#define degree(a)  180.0*a/pi
#define radiun(a)  pi*a/180.0
#define pr(a)      cout<<a<<"\n"
#define sz(x)      ((int)x.size())
#define all(a)     a.begin(),a.end()
#define mem(a,b)   memset(a,b,sizeof(a))
#define leadingzero(x) __builtin_clz(x)
#define trailingzero(x) __builtin_ctz(x)
#define countbit(x) __builtin_popcount(x)
#define lcm(a,b)   (abs(a)/gcd(a,b))*abs(b)

typedef long long int          lld;
typedef unsigned long long int llu;
typedef vector<int>            vi;
typedef pair<int,int>          pii;

template<class T>
T mod_f(T num)
{
    if(num>=0) return num%mod;
    else       return ((num%mod)+mod)%mod;
}

template<class T>
T fast_pow(T b,T p)
{
    if(p==0)
        return 1;
    if(p%2)
    {
        T x=mod_f(mod_f(b)*mod_f(fast_pow(b,p-1)));
        return x;
    }
    else
    {
        T x=mod_f(fast_pow(b,p/2));
        x=mod_f(mod_f(x)*mod_f(x));
        return x;
    }
}

template<class T>
T gcd(T a,T b)
{
    a=abs(a);
    b=abs(b);
    while(b)
    {
        T r=a%b;
        a=b;
        b=r;
    }
    return a;
}

template<class T>
ostream& operator<<(ostream& out,vector<T>v)
{
    int sz=v.size()-1;
    for(int i=0; i<=sz; i++) out<<v[i]<<" ";
    return out;
}

template<class T>
ostream& operator,(ostream& out,T a)
{
    out<<a<<" ";
    return out;
}

/* int gcd , x , y
void extendedEuclid(int A,int B)
{
    if(B==0)
    {
        gcd=A;
        x=1;
        y=0;
    }
    else
    {
        extendedEuclid(B,A%B);
        int u=x;
        x=y;
        y=u-(A/B)*y;
    }
}
*/
//bool isEqual(double a,double b) { return fabs(a-b)<=eps; }
//bool isLessThan(double a,double b) { return a+eps<b; }
//bool isLessThanEqual(double a,double b) { return a<b+eps; }
//bool isGreaterThan(double a,double b) { return a>b+eps; }
//bool isGreaterThanEqual(double a,double b) { return a+eps>b; }
//bool Palindrome(string s) { return equal(s.begin(), s.end(), s.rbegin()); }
//int day[]={0,31,28,31,30,31,30,31,31,30,31,30,31};

/*/ 4 direction ....

int dx[]= {+0,+1,+0,-1};
int dy[]= {+1,+0,-1,+0};

// 8 direction ....

int dx[]= {+0,+1,+1,+1,+0,-1,-1,-1};
int dy[]= {+1,+1,+0,-1,-1,-1,+0,+1};

// Knight direction...

int dx[]= {+1,-1,+2,-2,+2,-2,+1,-1};
int dy[]= {+2,+2,+1,+1,-1,-1,-2,-2};
*/

/***********Template Ends Here***********/

bool taken;

int main()
{
    //ios_base::sync_with_stdio(0);cin.tie(false);cout.tie(false);
    int x,y,n,i,p,q,a,b,_u,u,v;
    double LHS,D,d,ans;
    cin>>x>>y>>n;
    if(y<=n) cout<<x<<"/"<<y;
    else
    {
        LHS=x*1.0/y;
        for(i=1; i<=n; i++)
        {
            v=i;
            d=x*v*1.0/y;
            u=ceil(d);
            _u=floor(d);
            d=u*1.0/v;
            D=_u*1.0/v;
            if(taken)
            {
                if(fabs(LHS-d)<fabs(LHS-ans))
                {
                    ans=d;
                    a=u;
                    b=v;
                }
            }
            else
            {
                ans=d;
                a=u;
                b=v;
                taken=1;
            }
            if(fabs(LHS-D)<fabs(LHS-ans))
            {
                ans=D;
                a=_u;
                b=v;
            }
        }
        cout<<a<<"/"<<b;
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
int main()
{
    ll a, b, n ;
    cin >> a >> b >> n ;
    long double p = 1e18 ;
    ll ansa, ansb, up = 1e9;
    for(ll y = n ; y >= 1 ; y--)
    {
        ll x = a*y/b ;
        ll u = abs( a*y - b*x) ;
        if(u < up)
        {
            up = u ;
            ansa = x, ansb = y ;
        }
        x++;
        u = abs(a*y - b*x);
        if(u < up)
        {
            up = u ;
            ansa = x, ansb = y ;
        }
    }
    cout << ansa/__gcd(ansa,ansb) << "/" << ansb/__gcd(ansa,ansb) << endl ;
}

#include <bits/stdc++.h>

using namespace std;

int near(int a, int b, int d)
{
    double c = (double)(a * d) / (double)b;

    int fc = floor(c);
    int cc = ceil(c);

    double diff1 = abs(((double)fc/(double)d) - ((double)a/(double)b));
    double diff2 = abs(((double)cc/(double)d) - ((double)a/(double)b));

    if (diff1 <= diff2) return fc;
    else return cc;
}

int main()
{
    int a, b, c;
    cin >> a >> b >> c;

    int g = __gcd(a, b);
    a /= g;
    b /= g;

    double val = (double)a/(double)b;

    if (b <= c)
        cout << a << "/" << b << endl;
    else
    {
        int num = 0, dom = c;

        for (int i = 1; i <= c; i++)
        {
            int ne = near(a, b, i);
            double diff1 = abs(((double)ne/(double)i) - val);
            double diff2 = abs(((double)num/(double)dom) - val);

            //cout << ne << "/" << i << "  "<< diff1 << " " << diff2 << endl;

            if (diff1 < diff2)
            {
                num = ne;
                dom = i;
            }
        }

        int gg = __gcd(num, dom);
        num /= gg;
        dom /= gg;

        cout << num << "/" << dom << endl;
    }

    return 0;
}

#include<algorithm>
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<math.h>
#include<stack>
#include<utility>
#include<queue>
#include<algorithm>
#include<numeric>
using namespace std ;

int main(){
	double x, y, n ;
	cin >> x >> y >> n ;

	double a=x/y ;
	double ans=-1 ;
	double min=INT_MAX ;

	for(double i=1;i<=n;i++){
		double curr=abs(round((i/y)*x)-((i/y)*x)) ;

		if(curr<min){
			min=curr ;
			ans=i ;
		}
	}

	int num=round((ans/y)*x) ;
	int den=ans ;

	if(((ans/y)*x)==0.5000){
		num-- ;
	}

	cout << num << "/" << den ;

}

#include<stdio.h>
#include<string.h>
#include<math.h>
int gcd(int a,int b)
{
    return b?gcd(b,a%b):a;
}
int main()
{
    int x,y,n;
    int a,b,aa,bb;
    int i,j;
    double min,xx;
    while (scanf("%d%d%d",&x,&y,&n)!=EOF)
    {
        int g = gcd(x,y);
        x=x/g;
        y=y/g;
        if (n>=y) {printf("%d/%d\n",x,y);continue;}
        xx = (double)x/y;
        min = -1;
        for (b=1;b<n;++b)
        {
            a = b*x/y;
            if (fabs(xx-((double)a/b))>fabs(xx-((double)(a+1)/b)))
                a++;
            if (a>=1&&fabs(xx-((double)a/b))>=fabs(xx-((double)(a-1)/b)))
                a--;
            if (fabs(xx-((double)a/b))<fabs(xx-min))
            {
                min = (double)a/b;
                aa = a;
                bb = b;
            }
        }
        printf("%d/%d\n",aa/gcd(aa,bb),bb/gcd(aa,bb));
    }
    return 0;
}

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
#define pb      push_back
#define all(v)  v.begin(),v.end()
#define see(x)  cout<<#x<<" : "<<(x)<<endl;
#define ya      cout<<"YES"<<endl;
#define no      cout<<"NO"<<endl;
#define ff      first
#define sc      second
typedef long long ll;
typedef pair<ll,ll> pii;

int main()
{
    ll x,y,n,i,j,k,a=0,b=1;
    cin>>x>>y>>n;

    k=__gcd(x,y);
    x/=k;
    y/=k;

    if(y<=n)
    {
        cout<<x<<'/'<<y<<endl;
        exit(0);
    }
    double dif=1e12;
    double x_y=((double)x/(1.0*y));
    for(i=1; i<=n; i++)
    {
        ll aa=(i*x)/y;
        ll e=aa-1;
        ll f=aa+1;

        double p=x_y -((double)aa/(i*1.0));
        double pp=x_y -((double)e/(i*1.0));
        double ppp=x_y -((double)f/(i*1.0));
//        see(p)
//        see(pp)
//        see(ppp)
        if(fabs(p)<dif)
        {
            dif=fabs(p);
            a=aa;
            b=i;
        }
        if(fabs(pp)<dif)
        {
            dif=fabs(pp);
            a=e;
            b=i;
        }
        if(fabs(ppp)<dif)
        {
            dif=fabs(ppp);
            a=f;
            b=i;
        }
    }
    cout<<a<<'/'<<b<<endl;
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int
main(void){
	long long x, y, n; cin >> x >> y >> n;
	double n1 = (double)x/y;
	int num, denom;
	double inf = INT_MAX;
	//cout << floor((double)(3 * 5)/7);

	//cout << floor((double)(72657 * 49351) / 93778);
	for(int i = 1; i <= n; i++){
		int a = floor((double)(x*i)/y);
		int b = ceil((double)(x*i)/y);
		double n2 = (double)a/i;
		//cout << i << " " << a << " " << b << " " << n2 <<  endl;
		////cout << (double)fabs((double)n1 - n2) << endl;
		if((double)fabs(n1 - n2) - inf < 0){
			inf = (double)fabs(n1 - n2);
			num = a;
			denom = i;
		}
		n2 = (double)b/i;
		if((double)fabs(n1 - n2) - inf < 0){
			inf = (double)fabs(n1 - n2);
			denom = i;
			num = b;

		}
	}

	cout << num << "/" << denom;
}