They will not know if you just walk through immigration and customs, and then return later. There might be some wording somewhere to that extent, but I think that is a rule more honoured in breach than observance. I don't know how they would actually check. Unless you specifically tell them.