Man sentenced to two years for 'sexual contact' with dog