#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
long long int myRand(long long int B) { return (unsigned long long)rng() % B; }
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  int x, y;
  for (int i = 1; i <= n / 2; i++) {
    for (int j = 1; j <= m; j++) {
      cout << i << " " << j << "\n";
      cout << n + 1 - i << " " << m + 1 - j << "\n";
    }
  }
  if (n % 2 == 1) {
    for (int j = 1; j <= m / 2; j++) {
      cout << n / 2 + 1 << " " << j << "\n";
      cout << n / 2 + 1 << " " << m - j + 1 << "\n";
    }
    if (m % 2 == 1) {
      cout << n / 2 + 1 << " " << m / 2 + 1 << "\n";
    }
  }
}
