output_description: If a+b=15, print `+`; if a\times b=15, print `*`; if neither holds, print `x`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      a b
attempt: import sys
  
  input = sys.stdin.readline
  sys.setrecursionlimit(10**7)
  
  import numpy as np
  from heapq import heappush, heappop
  
  N, M, S, T = map(int, input().split())
  graph = [[] for _ in range(N + 1)]
  for _ in range(M):
      u, v, a, b = map(int, input().split())
      graph[u].append((v, a, b))
      graph[v].append((u, a, b))
  
  
  def dijkstra(start, mode):
      INF = 10**15
      dist = [INF] * (N + 1)
      dist[start] = 0
      q = [(0, start)]
      while q:
          d, v = heappop(q)
          if dist[v] < d:
              continue
          for w, *a in graph[v]:
              d1 = d + a[mode]
              if dist[w] > d1:
                  dist[w] = d1
                  heappush(q, (d1, w))
      return dist
  
  
  d1 = np.array(dijkstra(S, 0))
  d2 = np.array(dijkstra(T, 1))
  
  d1 += d2
  answer = 10**15 - np.minimum.accumulate(d1[::-1])[::-1][1:]
  
  print("\n".join(answer.astype(str)))
  
problem_description: Statement
  
  You are given two integers a and b. Determine if a+b=15 or a\times b=15 or
  neither holds.
  
  Note that a+b=15 and a\times b=15 do not hold at the same time.
samples: [{"input": "4 11", "output": "+\n    \n\n4+11=15.\n\n* * *"}, {"input": "3 5", "output": "*\n    \n\n3\\times 5=15.\n\n* * *"}, {"input": "1 1", "output": "x\n    \n\n1+1=2 and 1\\times 1=1, neither of which is 15."}]