using System;

namespace _6_3
{
    class Program
    {
        struct fraction
        {
            public int s;
            public int m;
        }

        static void Main(string[] args)
        {
            Console.Title = "_6_3";
            Console.ForegroundColor = ConsoleColor.White;
            //---------------------------------------------------
            fraction first, second, result;
            //---------------------------------------------------
            Console.Write("Enter s of first fraction: ");
            first.s = Convert.ToInt32(Console.ReadLine());
            Console.Write("Enter m of first fraction: ");
            first.m = Convert.ToInt32(Console.ReadLine());
            //---------------------------------------------------
            Console.Write("Enter s of second fraction: ");
            second.s = Convert.ToInt32(Console.ReadLine());
            Console.Write("Enter m of second fraction: ");
            second.m = Convert.ToInt32(Console.ReadLine());
            //---------------------------------------------------
            result.s = first.s * second.m;
            result.m = first.m * second.s;
            //---------------------------------------------------
            Console.WriteLine("Result: ");
            Console.WriteLine("({0}/{1})/({2}/{3}) = ({4}/{5})", first.s, first.m, second.s, second.m, result.s, result.m);
            //---------------------------------------------------
            Console.Write("\n\nPress any key to exit");
            Console.ReadLine();
        }
    }
}