Delete with subquery with no unique columns
Try using an EXISTS operator in your WHERE clause. I am not 100% of the exact syntax for sqlite but in SQL Server I would do something similar to the following:

DELETE from likes 
WHERE  EXISTS (SELECT *
               FROM   table 
               WHERE  likes.id1 = table.m
                      AND likes.id2 = table.n
                      AND your other conditions )