Python3: 123 bytes
N=sorted(map(int,input().split(' ')));print(''.join((''if n+1in N else'-'+str(n))if n-1in N else' '+str(n)for n in N)[1:])
N=sorted(map(int,input().split(' ')));print(''.join((''if n+1in N else'-'+str(n))if n-1in N else' '+str(n)for n in N)[1:])