import java.util.Scanner;
class App {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Fraction a = new Fraction(in.nextInt(), in.nextInt());
Fraction b = new Fraction(in.nextInt(), in.nextInt());
a.print();
b.print();
a.plus(b).print();
a.multiply(b).plus(new Fraction(5, 6)).print();
a.print();
b.print();
in.close();
}
}
class Fraction {
int up;
int down;
Fraction(int up, int down) {
this.up = up;
this.down = down;
int temp;
while ((temp = up % down) != 0) {
up = down;
down = temp;
}
temp = down;
if (temp != 1) {
this.up = this.up / temp;
this.down = this.down / temp;
}
}
void print() {
if (this.up == 1 && this.down == 1)
System.out.println("1");
else
System.out.println(this.up + "/" + this.down);
}
Fraction plus(Fraction b) {
int x1, x2, y1, y2;
x1 = this.up;
x2 = this.down;
y1 = b.up;
y2 = b.down;
int fenmu;
int fenzi;
fenzi = x1 * y2 + x2 * y1;
fenmu = x2 * y2;
int r, save1, save2;
save1 = fenzi;
save2 = fenmu;
while ((r = fenzi % fenmu) != 0) {
fenzi = fenmu;
fenmu = r;
}
fenzi = save1 / fenmu;
fenmu = save2 / fenmu;
return new Fraction(fenzi, fenmu);
}
Fraction multiply(Fraction b) {
return new Fraction(this.up * b.up, this.down * b.down);
}
}