Add base and input relations.