Facing Problem With For Loops

(i)we have to compare the first 4 elements of al1 to first 5 elements of al2 10/11,10/12,10/13,10/14,10/15,11,11,11/12,11/13,11/14,11/15,10/11,10/12,10/13,10/14,10/15......................like that all the elements

(ii) and then the same 5 elements of al1 and the next 5 elements of al2

10/16,10/17,10/18,10/19,10/20,11/16,11/17,11/18,11/19,11/20................................................ ..............like
that all the elements

so that we have to compare every element in the first array list, to every five elements at atime in the second arraylist?