Awk multiple columns in 2 files and output the matching lines -


i have 2 input files, follows x.txt

c20775336       maker   gene    1895    2166    .       -       .       id=gene1;name=maker-c20775336-augustus-gene-0.0 c20775336       maker   gene    3097    4624    .       -       .       parent=mrna1 

file 2 y.txt

scaffold4557    hsal_ogsv3.3    gene    3097    4624    74.8    +       .       id=hsal10661-ra;parent=hsal10661;name=hsal10661-ra;alias=hsal_17580--xp_001599845.1_nasvi c20775336       maker   gene     1895    1962    .       -       2       id=cds1;parent=mrna1 

i compare column 4 in both files , column 5 in both files, if satisfies both conditions , print line file 2 in above case..output should follows:

scaffold4557    hsal_ogsv3.3    gene    3097    4624    74.8    +       .       id=hsal10661-ra;parent=hsal10661;name=hsal10661-ra;alias=hsal_17580--xp_001599845.1_nasvi 

i tried using awk, not successful. in advance

$ awk 'fnr==nr{seen[$4,$5]=1;next} ($4,$5) in seen' x.txt y.txt  scaffold4557    hsal_ogsv3.3    gene    3097    4624    74.8    +       .       id=hsal10661-ra;parent=hsal10661;name=hsal10661-ra;alias=hsal_17580--xp_001599845.1_nasvi