about summary refs log tree commit diff
path: root/others/other/laybi.py
blob: ce0039638e93ea6497aa29fbda692a4c667f6dc3 (plain) (blame)
1
2
3
4
5
6
#!/usr/bin/env python3
from itertools import combinations as C

with open('laybi.inp') as fi, open('laybi.out', 'w') as fo:
    m = map(int, fi.read().split())
    fo.write('NO\n' if all(int.__sub__(*i) % 3 for i in C(m, 2)) else 'YES\n')