let fat tension
题号:NC239346
时间限制:C/C++/Rust/Pascal 3秒,其他语言6秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

In a virtual world, namely Jianghu, there are n Kungfu masters with their own unique skills. However, due to the lack of exercise, they were no longer skilled masters and were even getting fat! To deal with this problem, they decided to hold a Kungfu conference titled "let fat tension"(LFT, IF: 0.053), where they can deeply learn from each other to practice their skills.

The i-th Kungfu master has two attributes, which are the attribute of ability and the attribute of skill. The i-th master's attribute of ability can be represented as a vector X_i of length k while his attribute of skill can be represented as a vector Y_i of length d.

In the Kungfu conference, a master will deeply learn from every other Kungfu master to enhance their skills.

The learning efficiency between i-th master and j-th master is defined as le(i,j), which is the cosine similarity between their attribute of ability X_i and X_j. Formally, we have:



where "" denotes dot-product between two vectors and "" denotes the magnitude of a vector. Note that always holds.

After deeply learning from others, the i-th master's attribute of skill will become:



The learning process for n Kungfu masters happens simultaneously.

Please calculate the new attribute of skill for all Kungfu master.

Supplementary material:

The dot-product of two vectors A and B with length L is defined as .

The magnitude of a vector A with length L is defined as .

输入描述:

The first line contains three integers ------ the number of Kungfu masters, the length of X_i, the length of Y_i.

In the following n lines, the i-th line describes the X_i.

In the following n lines, the i-th line describes the Y_i.

It's guaranteed that the number in both X_i and Y_i are interger between 1 and .

输出描述:

Your output should contain n lines and the i-th line is .

Your answer is considered correct if its absolute or relative error does not exceed .

Formally, let your answer be a, and the jury's answer be b. Your answer is accepted if and only if .
示例1

输入

复制
3 2 3
3 4
6 8
5 12
1 2 3
2 5 3
5 3 1

输出

复制
7.84615385 9.90769231 6.96923077
7.84615385 9.90769231 6.96923077
7.90769231 9.78461538 6.81538462