First-principles study of two dimensional C3N and its derivatives