import string;r=raw_input;a,b=r(),r();print'%s and %s have %i out of %i chances of love'%(a,b,sum(map(lambda c:c in a and c in b,string.letters)),len(a)*len(b))
Jill Bill
Jill and Bill have 2 out of 16 chances of love
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!