#include <iostream>
using namespace std;
int main()
{
const int n=6;
int M1[n][n], M2[n][n], B[n];
for(int i=0; i<n; i++)
{
for(int j=0; j<n; j++)
{
cin >> M1[i][j];
}
}
for(int i=0; i<n; i++)
{
for(int j=0; j<n; j++)
{
cin >> M2[i][j];
}
}
for(int i=0; i<n; i++)
{
B[i]=1;
}
for(int i=0; i<n; i++)
{
for(int j=0; j<n; j++)
{
if (M1[i][j]>=0 || M2[i][j]>=0) {
B[i]=0;
break;
}
}
}
for(int i=0; i<n; i++)
{
cout << B[i]<< " ";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgCnsKIAljb25zdCBpbnQgbj02OwoJaW50IE0xW25dW25dLCBNMltuXVtuXSwgQltuXTsKCWZvcihpbnQgaT0wOyBpPG47IGkrKykgCgl7CgkJZm9yKGludCBqPTA7IGo8bjsgaisrKSAKCQl7CgkJCWNpbiA+PiBNMVtpXVtqXTsKCQl9Cgl9CiAKCWZvcihpbnQgaT0wOyBpPG47IGkrKykgCgl7CgkJZm9yKGludCBqPTA7IGo8bjsgaisrKSAKCQl7CgkJCWNpbiA+PiBNMltpXVtqXTsKCQl9Cgl9CiAgICAKICAgIGZvcihpbnQgaT0wOyBpPG47IGkrKykgCgl7CgkJQltpXT0xOwoJfQoJCiAgICBmb3IoaW50IGk9MDsgaTxuOyBpKyspIAoJewoJCWZvcihpbnQgaj0wOyBqPG47IGorKykgCgkJewoJCQlpZiAoTTFbaV1bal0+PTAgfHwgTTJbaV1bal0+PTApIHsKCQkJCUJbaV09MDsgIAoJCQkJYnJlYWs7CgkJCX0KCQl9Cgl9CiAgICAKICAgIGZvcihpbnQgaT0wOyBpPG47IGkrKykgCgl7CgkJY291dCA8PCBCW2ldPDwgIiAiOwoJfQoJCXJldHVybiAwOwp9
NCAtMzcgMTIgLTUgOCAtNwotMTYgLTggLTkgLTMgLTIgLTMgCi00IC0xIC0xIC0yIC04I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