Genesis 4:5 says, "But unto Cain and to his offering He [God]  had not respect".

           God didn't respect Cain's offering. How did they know that God didn't respect Cain's offering unless they had a way to know Him.