want to match column 1-5 in 2 files and print column1-5 along with column 6&7 from file1 and column6 from file2. Non-matching rows from both file should also get printed with NA value in non-matching columns
file1
12 800000 900000 66 73 0 0
12 900000 1000000 73 48 2 2
13 1000000 1100000 11 11 0 0
12 1100000 1200000 12 12 0 0
18 1400000 1600000 33 33 3 3
file2
12 800000 900000 66 73 145(28.12)
12 900000 1000000 73 48 703(51.17)
13 1000000 1100000 11 11 545(43.99)
12 1100000 1200000 12 12 699(45.30)
14 16100000 16200000 0 0 11(14.50)
14 16200000 16300000 0 0 0
Expected output
12 800000 900000 66 73 145(28.12) 0 0
12 900000 1000000 73 48 703(51.17) 2 2
13 1000000 1100000 11 11 545(43.99) 0 0
12 1100000 1200000 12 12 699(45.30) 0 0
14 16100000 16200000 0 0 11(14.50) NA NA
14 16200000 16300000 0 0 0 NA NA
18 1400000 1600000 33 33 NA 3 3
I tried below awk command but not getting columns from both files
awk 'FNR==NR{A[$1 FS $2 FS $3 FS $4 FS $5]=$3;next}{print ($1 FS $3 FS $4 FS $5 in A ) ? $0 OFS A[$1 FS $3 FS $4 FS $5] : $0 OFS "NA"}' file1 file2