If ad is not equal to bc, then find whether the pair of linear equation ax+by =p and cx+dy=q has no solution, unique solution or infinitely many solutions.