Folklore in Buddhist and Jaina literatures