YES

Proof:
This system is quasi-decreasing.
By \cite{O02}, p. 214, Proposition 7.2.50.
This system is of type 3 or smaller.
This system is deterministic.
System R transformed to U(R).
Call external tool:
ttt2 - trs 30
Input:
  a -> c
  a -> d
  b -> c
  b -> d
  s(c) -> t(k)
  s(c) -> t(l)
  g(x, x) -> h(x, x)
  ?1(t(y), x) -> pair(x, y)
  f(x) -> ?1(s(x), x)

 DP Processor:
  DPs:
   f#(x) -> s#(x)
   f#(x) -> ?1#(s(x),x)
  TRS:
   a() -> c()
   a() -> d()
   b() -> c()
   b() -> d()
   s(c()) -> t(k())
   s(c()) -> t(l())
   g(x,x) -> h(x,x)
   ?1(t(y),x) -> pair(x,y)
   f(x) -> ?1(s(x),x)
  TDG Processor:
   DPs:
    f#(x) -> s#(x)
    f#(x) -> ?1#(s(x),x)
   TRS:
    a() -> c()
    a() -> d()
    b() -> c()
    b() -> d()
    s(c()) -> t(k())
    s(c()) -> t(l())
    g(x,x) -> h(x,x)
    ?1(t(y),x) -> pair(x,y)
    f(x) -> ?1(s(x),x)
   graph:
    
   Qed