I am confused how to write this formula...

I need this...

=if(max of few cells (assume (a1:n1)) and min of few cells (assume (a2:n2)) falls on the same column, "YES","NO")

how to write this in a formula? Please someone help me on this.

Thank you.