public static void markRowColumn(int[][] input) {
        boolean[] row = new boolean[input.length];
        boolean[] column = new boolean [input[0].length];

        for (int i = 0; i < input.length; i++) {
            for (int j = 0; j < input[0].length; j++) {
                if(input[i][j] ==1){
                    row[i] |= true;
                    column[j] |= true;
                }

            }
        }

        for( int i=0; i< row.length; i++){
            for (int j = 0; j < column.length; j++) {
                if(row[i]){
                    input[i][j] = 1;
                }

            }
        }


        for( int i=0; i< column.length; i++){
            for (int j = 0; j < row.length; j++) {
                if(column[i]){
                    input[j][i] = 1;
                }

            }
        }

    }