#include <iostream>
#include <string>
#include <iomanip>
using namespace std;

class Watch{
	public:
		string brand;
		string color;
		double price;
		double weight;
		void print(){
			cout << brand << " " << color << " " << fixed << setprecision(2) << price/weight << endl;
		}
};

int main(){
	Watch w1;
	cin >> w1.brand >> w1.color >> w1.price >> w1.weight;
	w1.print();
	Watch w2;
	cin >> w2.brand >> w2.color >> w2.price >> w2.weight;
	w2.print();
}