These are 2 commands(put one in a command block a the other in the other)
The command to have command blocks is:
/give @p command_block 64
Estos son 2 comandos (ponga uno en un bloque de comando y el otro en el otro) El comando para tener bloques de comando es: /give @p command_block 64