program ppp;
var
ar: array of array of Integer;
res: Integer;
n: Integer;
i, j: Integer;
begin
n := 5;
SetLength(ar, n, n);
for i := 0 to n-1 do
for j := 0 to n-1 do
read(ar[i][j]);
res := 1;
res := res * ar[i][i];
writeln(res);
end.
program ppp;
var
ar: array of array of Integer;
res: Integer;
n: Integer;
i, j: Integer;
begin
n := 5;
SetLength(ar, n, n);
for i := 0 to n-1 do
for j := 0 to n-1 do
read(ar[i][j]);
res := 1;
for i := 0 to n-1 do
res := res * ar[i][i];
writeln(res);
end.