#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const int MOD = 1000000007;
const int inf = (1 << 30) - 1;
const ll INF = (1LL << 60) - 1;
template <typename T>
bool chmax(T &x, const T &y) {
  return (x < y) ? (x = y, true) : false;
};
template <typename T>
bool chmin(T &x, const T &y) {
  return (x > y) ? (x = y, true) : false;
};
struct io_setup {
  io_setup() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << fixed << setprecision(15);
  }
} io_setup;
template <typename T>
struct Weighted_Graph {
  struct edge {
    int to;
    T cost;
    edge(int to, T cost) : to(to), cost(cost) {}
  };
  vector<vector<edge>> es, rs;
  vector<T> d;
  vector<int> pre_v;
  vector<int> keep;
  const T INF_T;
  const int n;
  Weighted_Graph(int n) : INF_T(numeric_limits<T>::max()), n(n) {
    es.resize(n), rs.resize(n), d.resize(n), pre_v.resize(n);
  }
  void add_edge(int from, int to, T cost, bool directed = false) {
    es[from].emplace_back(to, cost), rs[to].emplace_back(from, cost);
    if (!directed) es[to].emplace_back(from, cost);
  }
  T dijkstra(int s, int t = 0) {
    fill(d.begin(), d.end(), INF_T);
    using P = pair<T, int>;
    priority_queue<P, vector<P>, greater<P>> que;
    que.emplace(d[s] = 0, s);
    while (!que.empty()) {
      auto [p, i] = que.top();
      que.pop();
      if (p > d[i]) continue;
      for (auto &e : es[i]) {
        if (chmin(d[e.to], d[i] + e.cost)) {
          pre_v[e.to] = i, que.emplace(d[e.to], e.to);
        }
      }
    }
    return d[t];
  }
  vector<int> shortest_path(int s, int t) {
    keep.clear();
    if (dijkstra(s, t) == INF_T) return keep;
    for (int now = t; now != s; now = pre_v[now]) keep.push_back(now);
    keep.push_back(s), reverse(keep.begin(), keep.end());
    return keep;
  }
};
int main() {
  int N, Q;
  cin >> N >> Q;
  Weighted_Graph<int> G(N);
  while (Q--) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    G.add_edge(v, u, 1, true);
  }
  int K;
  cin >> K;
  vector<int> p(K);
  for (int i = 0; i < K; i++) {
    cin >> p[i];
    p[i]--;
  }
  int m = 0, M = 0;
  G.dijkstra(p.back());
  for (int i = 0; i < K - 1; i++) {
    if (G.d[p[i]] < G.d[p[i + 1]] + 1)
      m++, M++;
    else {
      bool flag = false;
      for (auto &e : G.rs[p[i]]) {
        if (e.to == p[i + 1]) continue;
        if (G.d[e.to] + 1 == G.d[p[i]]) flag = true;
      }
      if (flag) M++;
    }
  }
  cout << m << ' ' << M << '\n';
}
