Return if cell contain non prime number or obstacle , or going out of matrix or already visited the cell or already found the lexicographical largest path
if ( ( mappedMatrix [ i ] [ j ] == 0 ? true : false ) || ( i > n ? true : false ) || ( j > m ? true : false ) || ( mark [ i ] [ j ] != 0 ? true : false ) || ( q != 0 ? true : false ) ) return ;