They work only with integer arguments but any single argument can be a variable which is then instantiated so that the relation holds. If more than one argument is uninstantiated, an instantiation fault is produced.
Note that if one of the first two arguments is a variable, a solution doesn't necessarily exist. For example, the following goal has no integer solution :
[eclipse 1]: times(2, X, 3). no (more) solution.
Since any one of the arguments of these two predicates can be a variable, it does not make much sense to use them in arithmetic expressions where always the first arguments are taken as input and the last one as output. Their most convenient use is in the coroutining mode, where they delay until their arguments are sufficiently instantiated. This is described in section 10.6.